Sub NextBlankDown()
Range("a1").Activate
If ActiveCell.End(xlDown).Row = Rows.Count Then Exit Sub
MsgBox (ActiveCell.End(xlDown).Offset(1, 0).Address)
End Sub
That seems to return unwanted results
A1 56
A2 96
A3
A4 78
A5 99
A6
A7
A8 123
array formula returns A6 ,the first blankcell is A3 ..
or
Macro:
Sub NextBlankDown()
Range("a1").Activate
If ActiveCell.End(xlDown).Row = Rows.Count Then Exit Sub
MsgBox (ActiveCell.End(xlDown).Offset(1, 0).Address)
End Sub
I'm interested in something similar to SQL Server
RowCount. I want to obtain the number of rows that
contain data (not all the rows in the spreadsheet i.e.
Rows.Count). If I know the row number of A11 in your
example, I can determine the number of rows that contain
data.
If there are no empty cells between A1 and the last cell used in column A,
=COUNTA(A:A)+1
will suffice.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.