How do I count the number of populated cells (with text/number or combinations of text+number)?
I tried =countif(A2:A2000,1=1)
(with a general criteria, e.g. 1=1 always) but shows zero (0) for a text column.
How do I count the number of populated cells (with text/number or combinations of text+number)?
I tried =countif(A2:A2000,1=1)
(with a general criteria, e.g. 1=1 always) but shows zero (0) for a text column.
I think for the answer above, it should rather be
Application.WorksheetFunction.CountA(Range("A2:A2000"))
I have always faced problems while not mentioning Range, cause it considers the whole range to be as a single unit.
Dim Coloumncount As Integer Coloumncount = Application.WorksheetFunction.CountA([D1:D100])'count how many filled cell in coloumn "D"