Excel VB 小程式
+————————————————————————-+
col = ActiveCell.Column
While ActiveCell.Row > 1
Dim strRack() As String
p = ""
If InStr(ActiveCell.Value, p) Then p = Chr(10)
If InStr(ActiveCell.Value, ";") Then p = ";"
If Len(p) Then
strRack = Split(ActiveCell.Value, p)
For i = UBound(strRack) To LBound(strRack) + 1 Step -1
ActiveCell.Offset(1, 0).Select
ActiveCell.EntireRow.Insert Shift:=xlDown
ActiveCell.Value = strRack(i)
ActiveCell.Offset(-1, 0).Select
Next
ActiveCell.Value = strRack(i)
End If
ActiveSheet.Cells(ActiveCell.Row - 1, col).Select
Wend
+————————————————————————-+
(more…)








