✔ 最佳答案
Sub Macro1()
Sheets("Sheet1").Select
SelectDataAndCopy (248)
Sheets("Sheet2").Select
Range("A4").Select
ActiveSheet.Paste
End Sub
Public Sub SelectDataAndCopy(ByVal numberOfRow As Integer)
Dim sht As Worksheet
Dim startAtRow As Integer
Dim endAtRow As Integer
Sheets("Sheet1").Select
Set sht = ActiveSheet
endAtRow = sht.Cells(sht.Rows.Count, "A").End(xlUp).Row
startAtRow = endAtRow - numberOfRow + 1
Range("a" & startAtRow & ":f" & endAtRow).Select
Selection.Copy
End Sub