Counting the number of nonempty cells

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

I want to count the number of nonempty cells in column A. However, I do not
want to start with cell A1. I want to begin counting in cell A4. Then I
would llike to assign this value to a variable. Any help would be greatly
appreciated.

Thanks
sc
 
Hi SC,

Try:

Sub Tester()
Dim rng As Range
Dim iCtr As Long

Set rng = Range("A4:A" & Rows.Count)
i = Application.CountA(rng)
'Return count of populated cells
MsgBox iCtr

End Sub
 
Back
Top