Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveCell.Column = 3 Or ActiveCell.Column = 4 Then
For i = 0 To 3
Cells(ActiveCell.Row, 7 + i) = Mid(ActiveCell, i * 4 + 1, 4)
Next i
End If
End Sub作者: GBKEE 時間: 2010-8-19 13:53
還有個很常用的:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column <> 3 And Target.Column <> 4 Then Exit Sub
Target.Parse "[xxxx][xxxx][xxxx][xxxx]", Cells(Target.Row, 7)
End Sub作者: metrostar 時間: 2010-8-20 07:56