Hello. Would somebody be able to help please. I have a sheet in which the first 3 rows are headers and the data starts in A4. A variable number of rows starting in A4 will be completed. I would like to copy only the completed rows to a second sheet. When I run the code copied below, it is copying from the third row to the last completed row. Any ideas? Apologies, I am very new to this.
Thanks for the help!
Thanks for the help!
VBA Code:
Private Sub CommandButton1_Click()
Unload Me
'Define copy selection as 4th row to last completed row, columns A to AD (30)
LastRow = ActiveSheet.Cells(ActiveSheet.Rows.Count, 30).End(xlUp).Row
'Load completed cases to the Log sheet on clicking "Yes"
Sheets("Today's List").Range("A4", ActiveSheet.Cells(LastRow, 30)).Copy
Sheets("Log").Cells(Rows.Count, "A").End(xlUp).Offset(1). _
PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
'Clear the list
ActiveWorkbook.Worksheets("Today's List").Range("B2").ClearContents
ActiveWorkbook.Worksheets("Today's List").Range("A4:AD500").ClearContents
'Pop up response
response = MsgBox("Cases Uploaded")
End Sub
Last edited by a moderator: