如上
'代號與名稱拆解,視個人需求;此段可省
Dim i%, strn$, Rng As Range
Application.ScreenUpdating = False
Set Rng = Range("F3")
For i = 1 To Len(Rng)
strn = Mid(Rng, i, 1)
If Not IsNumeric(strn) Then
Rng.Offset(0, 1) = "'" & Mid(Rng, 1, i - 1)
Rng.Offset(0, 2) = Mid(Rng, i)
Exit For
End If
Next i
Application.ScreenUpdating = True
'代號與名稱拆解,這段語法也可參考GBKEE的Code
Dim i%, Rng As Range
Application.ScreenUpdating = False
Set Rng = Range("F3")
Do
For i = 1 To Len(Rng)
If Not IsNumeric(Mid(Rng, i, 1)) Then
Rng.Offset(0, 1) = "'" & Mid(Rng, 1, i - 1)
Rng.Offset(0, 2) = Mid(Rng, i)
Exit For
End If
Next i
Set Rng = Rng.Offset(1)
Loop Until Rng = ""
Application.ScreenUpdating = True作者: lalalada 時間: 2012-8-9 15:53