Determine the Empty row and/or column

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.
 
M

Mike H

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top