I want to be able to press a button to copy some data across from sheet "Data Entry" to the first blank row in another sheet "Database".
However, if the first column is blank, I don't want that row of data to be copied. Also, sometimes the "Data Entry" sheet may have 4 rows of data, whilst sometimes it may have 5, 6, 7 or 8.
I've attached screenshots below.
The code I'm using so far is not giving any error, but nothing seems to be happening, either.
Private Sub CommandButton1_Click()
Dim cl As Range
For Each cl In Sheet2.Range("A8:A23")
If Not IsEmpty(ActiveCell.Value) Then
Range("A" & ActiveCell.Row & ":R" & ActiveCell.Row).Select
Selection.Copy
Sheets("Database").Select
ActiveCell.End(xlDown).Offset(1, 0).Select
ActiveSheet.Paste
End If
Next cl
End Sub