View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Leith Ross[_2_] Leith Ross[_2_] is offline
external usenet poster
 
Posts: 128
Default Determine if Column Populated

On Apr 8, 6:56 pm, kirkm wrote:
In code, what would be the best / easiset way to
determine if a column has anything in any of
its rows (irrespective of how many rows) ?

I'll like to code a function that returns 0 if an entire column
is empty.

Thanks - Kirk


Hello Kirk,

Here is a simple way in VBA. Just change the column letter to match
the range to check.

N = WorksheetFunction.CountA(Range("D:D"))

Sincerely,
Leith Ross