ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Determine the Empty row and/or column (https://www.excelbanter.com/excel-programming/440716-determine-empty-row-column.html)

Subodh

Determine the Empty row and/or column
 
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.

Mike H

Determine the Empty row and/or column
 
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.


"Subodh" wrote:

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



All times are GMT +1. The time now is 01:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com