我有一列收款人名单、他们的银行号码、我的参考资料和他们的参考资料。
R & J Fred Ltd
12-3456-7890123-45
Freds Fish
Bevan
Joe King Mata Ltd
01-1234-1234567-89
Joes Boats
Bevan01
Dave's the Barber
12-3456-7891478-92
Daves Shaves
Accnt 45
我想把它做成这样的表格:
Payee Account MyRef TheirRef
R & J Fred Ltd 12-3456-7890123-45 Freds Fish Bevan
Joe King Mata Ltd 01-1234-1234567-89 Joes Boats Bevan01
Dave's the Barber 12-3456-7891478-92 Daves Shaves Accnt 45
好的,所以我也不知道如何将它变成这个网站的漂亮降价,顺便说一句:)
有 300 行数据,全部在一列中,按照相同的顺序一直到列表中。
我认为有一种简单的方法可以做到这一点,但我似乎找不到它。
这可能不是最快或最优雅的解决方案,但确实得到了预期的结果。这是基于假设您的数据列是 A,而干净的数据将在列 B 到 E 中。
Sub Cleanmeup()
Dim lastrow As Integer
Dim cel As Range
Dim i As Double, j As Double
lastrow = Sheets(1).Range("A:A").Cells(Rows.Count, 1).End(xlUp).Row
i = 2
j = 2
For Each cel In Range("A2:A" & lastrow)
If i = 6 Then
i = 2
j = j + 1
End If
Cells(j, i).Value = cel
i = i + 1
Next cel
End Sub
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句