我在一个excel列中有很多数据,用空白单元格分隔,如
Name
email
phone 1
phone 2
Name
email
phone
fax
我需要像这样把它们放进去......
Name Name
email Email
phone 1 Phone
phone 2 Fax
任何人都可以帮助我吗?请...
答案 0 :(得分:0)
如果您从以下数据开始:
并运行此宏:
Sub reorg()
Dim i As Long, j As Long, k As Long
Dim N As Long
N = Cells(Rows.Count, "A").End(xlUp).Row
j = 2
k = 1
For i = 1 To N
If Cells(i, 1).Value <> "" Then
Cells(k, j).Value = Cells(i, 1).Value
k = k + 1
Else
j = j + 1
k = 1
End If
Next i
End Sub
你最终会得到这样的数据:
如果需要,您可以手动删除第一列。