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

[µo°Ý] mid+search¤§vba°ÝÃD½Ð±Ð

[µo°Ý] mid+search¤§vba°ÝÃD½Ð±Ð

dear all¤j¤j -
1. cells(5,3)=Q15108A-CO1-01-J001EM
     cells(6,3)=Q15030A-CS5T1-01-T002 ............
2.¤p§Ì©ó  cells(5,18)®Ñ¼g¨ç¼Æ§ì¨ú=MID(C5,SEARCH("-",C5)+1,SEARCH("-0",C5)-SEARCH("-",C5)-1)
    µ{¦¡¤U°Õ§¡ok
3.¤µ·QÂà´«¬° vba.
    3.1 ¦p¹Ï¤@  mid³¡¥÷¼g§Ì®Ñ¼gok ¦ý  SEARCH³¡¥÷¤£·|¼g.¦p¹Ï¤@Mid(Sheet2.Cells(X, 3), 9, 3)¤§ 9 »P 3
         ¦p¦ó¤Uvba
4.·Ð¤£§[½ç±Ð  thanks*10000   

¹Ï¤@Sub µ{¦¡VBA()
Y = Sheet2.[A65536].End(xlUp).Row
'  On Error Resume Next
  For X = 5 To Y
  If 1 = 1 Then
   Sheet2.Cells(X, 18) = Mid(Sheet2.Cells(X, 3), 9, 3)
  End If
  Next
End Sub
ù

¦^´_ 1# rouber590324

Sub ex()
Y = Sheet2.[c65536].End(xlUp).Row
'  On Error Resume Next
  For X = 5 To Y
  If 1 = 1 Then
   Sheet2.Cells(X, 18) = Split(Sheet2.Cells(X, 3), "-")(1)
  End If
  Next
End Sub

¸Õ¸Õ!!

TOP

dear  sir  
  100% ²Å¦X »Ý¨D  thanks*10000
ù

TOP

¦^´_ 3# rouber590324

¥u¬O§Ú¤£ÁA¸Ñ¬°¦ó§A·|¥[1¦æ  If 1 = 1 Then ªº¥Î·N??

Sub ex()
  Y = Sheet2.[c65536].End(xlUp).Row
  For X = 5 To Y
       Sheet2.Cells(X, 18) = Split(Sheet2.Cells(X, 3), "-")(1)
  Next
End Sub

TOP

dear jcchiang ¤j¤j
1=1 ¬O¦³¨ä¥¦¤½¦¡.¥ý¼g1=1 µM«á­n§ï¨ä¥L¤½¦¡
·PÁ±z¤§´£¿ô   thanks*10000
ù

TOP

        ÀR«ä¦Û¦b : ¤H¨ÆªºÁ}Ãø»PµZ¿i¡A´N¬O¤@ºØ¦ÒÅç¡C
ªð¦^¦Cªí ¤W¤@¥DÃD