Sub 分割()
Dim i As Integer
With Sheet2
.Cells(1, 2) = "編號"
.Cells(1, 3) = "名稱"
For i = 2 To .Cells(65536, 6).End(xlUp).Row
Sheet2.Cells(i, 2) = Split(.Cells(i, 1), " ")(0)
Sheet2.Cells(i, 3) = Split(.Cells(i, 1), " ")(1)
Next i
End With
End Sub作者: 魷魚絲 時間: 2015-12-5 11:53
Sub 分割()
Dim xR As Range, U
For Each xR In Range([A2], [A65536].End(xlUp))
U = Val(1 & xR)
xR(1, 2) = Mid(U, 2)
xR(1, 3) = Mid(xR, Len(U))
Next
End Sub