Sub CopyRow()
Sheets("Master").Range("A1:S1").Copy Sheets("Copy").Range("A" & Rows.Count).End(xlUp).Offset(1)
End Sub
Sheets("Master").Range("A1:S1").Copy
With Sheets("Copy").Range("A" & Rows.Count).End(xlUp).Offset(1)
.PasteSpecial (xlPasteAll)
.PasteSpecial (xlPasteValues)
End With
Sub CopyActiveRow()
Range("A1:S1").Offset(ActiveCell.Row - 1).Resize(Selection.Rows.Count).Copy
With Sheets("Copy").Range("A" & Rows.Count).End(xlUp).Offset(1)
.PasteSpecial (xlPasteAll)
.PasteSpecial (xlPasteValues)
End With
End Sub
Sub CopyActiveRow()
Range("A1:S1").Offset(ActiveCell.Row - 1).Resize(Selection.Rows.Count).Copy
With Sheets("Master").Range("A" & Rows.Count).End(xlUp).Offset(1)
.PasteSpecial (xlPasteAll)
.PasteSpecial (xlPasteValues)
End With
End Sub
Rows being selected by user are on sheet "copy"where you have mentioned the sheet name ("Copy").
Sub CopyActiveRow()
'The active cell is the FIRST cell in a selected range
'with range A6:A8 selected, ActiveCell =A6
'ActiveCell.Row is the row number of that cell = 6
'Selection.Rows.Count = the count of rows in the selected range = 3 (rows 6,7,8)
'A1:S1 is offset by 5 rows ( ie ActiveCell.Row 6 MINUS 1 = 5) = A6:S6
'A6:S6 is then resized to 3 rows = A6:S8
' that range is copied
Range("A1:S1").Offset(ActiveCell.Row - 1).Resize(Selection.Rows.Count).Copy
'standard technique to find last cell in column A and then offseting by one row
' same as putting cusor in cell A1048576 followed by {END}{UP arrow}{DOWN arrow}
With Sheets("Master").Range("A" & Rows.Count).End(xlUp).Offset(1)
'paste everything including formula
.PasteSpecial (xlPasteAll)
'overwrite with values
.PasteSpecial (xlPasteValues)
End With
End Sub
Rows being selected by user are on sheet "copy"
So sheet "Copy" is the active sheet
(Unless qualified with a sheet reference) ranges automatically refer to the active sheet
Range("A1:S1").Offset(ActiveCell.Row - 1).Resize(Selection.Rows.Count).Copy
VBA Code:Sub CopyActiveRow() 'The active cell is the FIRST cell in a selected range 'with range A6:A8 selected, ActiveCell =A6 'ActiveCell.Row is the row number of that cell = 6 'Selection.Rows.Count = the count of rows in the selected range = 3 (rows 6,7,8) 'A1:S1 is offset by 5 rows ( ie ActiveCell.Row 6 MINUS 1 = 5) = A6:S6 'A6:S6 is then resized to 3 rows = A6:S8 ' that range is copied Range("A1:S1").Offset(ActiveCell.Row - 1).Resize(Selection.Rows.Count).Copy 'standard technique to find last cell in column A and then offseting by one row ' same as putting cusor in cell A1048576 followed by {END}{UP arrow}{DOWN arrow} With Sheets("Master").Range("A" & Rows.Count).End(xlUp).Offset(1) 'paste everything including formula .PasteSpecial (xlPasteAll) 'overwrite with values .PasteSpecial (xlPasteValues) End With End Sub