I am trying to print information on the next empty cell
This is my code
However at Cells(n1,1) there is there are other things printed there.
Below is an image of my excel. i want the code above to print on L2, L3 and so on when there is an empty cell and regardless whether A1, A2 and so on is empty or filled.
This is my code
Code:
Dim r1 As Range
Dim n1 As Long
Dim NextRow1 As Long
Application.ScreenUpdating = False
Sheets("Sheet1").Select
NextRow1 = Application.WorksheetFunction.CountA(Range("A:A")) + 1
Set r1 = Range(Cells(2, 1), Cells(NextRow1, 1))
For n1 = 2 To r1.Rows.Count
If Cells(n1, 12).Value = "" Then
Cells(n1, 12).Value = "Hi"
End If
Next n1
However at Cells(n1,1) there is there are other things printed there.
Below is an image of my excel. i want the code above to print on L2, L3 and so on when there is an empty cell and regardless whether A1, A2 and so on is empty or filled.