View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Hutchins Tom Hutchins is offline
external usenet poster
 
Posts: 1,069
Default Determine if Column Populated

This is pretty easy...

Public Function IsColEmpty(WhichCol As String) As Integer
IsColEmpty = Application.WorksheetFunction.CountA(Columns(Which Col))
End Function

You would call it like this...

Sub AAAA()
MsgBox IsColEmpty("L")
End Sub

Hope this helps,

Hutch

"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