ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¦p¦ó¦b³æ¤¸®æ©â¨ú¯S©wªº¤å¦r¡H

[µo°Ý] ¦p¦ó¦b³æ¤¸®æ©â¨ú¯S©wªº¤å¦r¡H

VBA.jpg

¨Ò¦p¤W¹Ï¡A·Q©â¨úAÄæ¯S©wªº¸¹½X¦pABCD2685444¡A¦ý¸m©ó¤å¦rªº«e«á©Î¤¤¶¡¡A¦p¦ó³z¹LVBA§â¥¦­Ì©â¥X¨Ó©ñ©óBÄæ¡HÁÂÁ¡I¡I

http://blog.xuite.net/hcm19522/twblog/372861868

TOP

¦^´_ 1# leehom
¼Ò²Õ¤¤¼W¥[¦Û­q¨ç¼Æ
  1. Function GetSerialNumber(s As String) As String
  2.     Dim oMatch As Object
  3.     With CreateObject("vbscript.regexp")
  4.         '°²³]³W«h¬° 4­Ó¤j¼g­^¤å+7­Ó¼Æ¦r ªº¿W¥ß³æµü
  5.         .Pattern = "\b[A-Z]{4}[0-9]{7}\b"
  6.         Set oMatch = .Execute(s)
  7.     End With
  8.     If oMatch.Count > 0 Then GetSerialNumber = oMatch(0)
  9. End Function
½Æ»s¥N½X
B1¶ñ¤J =GetSerialNumber(A1)
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

¦^´_ 3# stillfish00

ÁÂÁ°Ú!«Ü´Î!!:D

TOP

http://blog.xuite.net/hcm19522/twblog/372861868
hcm19522 µoªí©ó 2016-1-11 14:12


¨ç¼Æ°Ú,¾Ç²ß¤@¤U,ÁÂÁ§A°Ú!!

TOP

        ÀR«ä¦Û¦b : ¡i¬O§_µo´§¤F¨}¯à¡H¡j¤H¶¡¹Ø©R¦]¬°µu¼È¡A¤~§óÅã±o¬Ã¶Q¡CÃø±o¨Ó¤@½ë¤H¶¡¡AÀ³°Ý¬O§_¬°¤H¶¡µo´§¤F¦Û¤vªº¨}¯à¡A¦Ó¤£­n¤@¨ý¨Dªø¹Ø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD