Determine the Empty row and/or column

  • Thread starter Thread starter Subodh
  • Start date Start date
S

Subodh

I want to determine if a particular row or column is empty using VBA??
I can determine the last used row in the given worksheet. But this is
differenet from determining the last used row.
As other row below the empty row may have data in it.
 
Hi,

Try these 2 which return TRUE if the row or column is empty

RowEmpty = WorksheetFunction.CountA(Rows(1)) = 0

ColumnEmpty = WorksheetFunction.CountA(Columns(1)) = 0

Generally, I find this webpage a great reference for last row etc

http://www.mvps.org/dmcritchie/excel/lastcell.htm
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 
Back
Top