Note: This answer was for the original question with Sub hh
which has since been edited out to create a new question
First of all your original code can be rewritten as:
Sub hh()
Sheets("Sheet2").Range("A1:A11").Copy
Sheets("Sheet1").Range("B19").Paste
Sheets("Sheet2").Range("A2:A5").Copy
Sheets("Sheet1").Range("B30").Paste
End Sub
Now you can modify the paste location based on the 'last row' which is what I believe you are asking. The last row would be found like this:
(comments in line)
Sub hh()
'Varible to store the last row in
Dim iLastRowSheet1 As Long
'copy initial data to memory
Sheets("Sheet2").Range("A1:A11").Copy
'find current last row
With Sheets("Sheet1")
iLastRowSheet1 = .Range(B & .Rows.Count).End(xlUp).Row
End With
'paste using last row found + 1
Sheets("Sheet1").Range("B" & (iLastRowSheet1 + 1)).Paste
'repeat
Sheets("Sheet2").Range("A2:A5").Copy
With Sheets("Sheet1")
iLastRowSheet1 = .Range(B & .Rows.Count).End(xlUp).Row
End With
Sheets("Sheet1").Range("B" & (iLastRowSheet1 + 1)).Paste
End Sub
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…