我在EXCEL中做了个VBA程序,你下载将A列复制进去,按钮执行就行了。
Sub 展开_Click()
Dim lastrow As Integer, i As Long, j As Integer, k As Integer, l As String
lastrow = Cells(Rows.Count, 1).End(xlUp).Row
k = 1
For i = 1 To lastrow
l = Cells(i, 1)
Do While Len(l) > 4
j = WorksheetFunction.Find(",", l) ‘注意你的逗号和这个逗号要相同
Cells(k, 2) = Left(l, j - 1)
l = Right(l, Len(l) - j)
k = k + 1
Loop
Cells(k, 2) = l
k = k + 1
Next
End Sub
用VBA,使用正则表达式,完全无压力。
1,公式得到B好难
2.VBA行不行?