诚然,我迟到了 5 年才提供解决方案......这是我解决这个问题的方法
Sub consol
Dim maxi as long, restrtrow as long, i as long
For i = 1 to 4
If i = 1 or i = 3 then
Maxi= sheets ("input").cells (1000000,i).end (xlup).row
Restrtrow = sheets ("output").cells (1000000,1).end (xlup).row+1
Sheets ("input").select
Range (Cells (2 ,i),cells ( maxi,i)).copy
Sheets ("output").select
Cells(Restrtrow,1).SELECT
Selection.pastespecial paste:= xlpastevalues
Elseif i =2 or i=4 then
Sheets ("input").select
Range (cells (2,i),cells (maxi,i)).select
Selection.copy
Sheets ("output").select
Cells (2,restrtrow).select
Selection.pastespecial paste:= xlpastevalues
End if
next
end sub