用VBA:
Sub mymove()
Cells(1, 1).End(xlDown).Select
r = ActiveCell.Row
c = 2
While Cells(1, c) ""
p = 1 '每列从第一行开始,如果是从第二行开始,则改成 p = 2
While Cells(p, c) ""
r = r + 1
Cells(r, 1) = Cells(p, c)
Cells(p, c) = ""
p = p + 1
Wend
c = c + 1
Wend
End Su
用VBA:
Sub mymove()
Cells(1, 1).End(xlDown).Select
r = ActiveCell.Row
c = 2
While Cells(1, c) ""
p = 1 '每列从第一行开始,如果是从第二行开始,则改成 p = 2
While Cells(p, c) ""
r = r + 1
Cells(r, 1) = Cells(p, c)
Cells(p, c) = ""
p = p + 1
Wend
c = c + 1
Wend
End Su