|
可以通过VBA语句来实现。
- Sub 拆分()
- Dim i As Long, n As Long, j As Long, m As Long, Arr, d, k
- Ro = Range("A1").CurrentRegion.Rows.Count
- For i = 2 To Ro
- n = n + 1
- If n = 1 Then
- d = Cells(i, 1)
- Else
- d = d & Chr(10) & Cells(i, 1)
- End If
- Next
- Arr = Split(Replace(Replace(d, "<br/>【汇总信息】:", ""), ":", ","), Chr(10))
- For j = 0 To UBound(Arr)
- Cells(2 + m, 4).Resize(1, 4) = Split(Arr(j), ",")
- m = m + 1
- Next
- Range("G2:G65536").Select
- Selection.Copy
- Range("F2").Select
- ActiveSheet.Paste
- Range("D2:D65536").ClearContents
- Range("G2:G65536").ClearContents
- End Sub
复制代码 |
|