Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


Testing for blank and/or empty rows or columns


Testing for blank and/or empty rows or columns

Author
Message
devophil
devophil
Forum God
Forum God (423 reputation)Forum God (423 reputation)Forum God (423 reputation)Forum God (423 reputation)Forum God (423 reputation)Forum God (423 reputation)Forum God (423 reputation)Forum God (423 reputation)Forum God (423 reputation)

Group: Forum Members
Posts: 1, Visits: 5
I wish to loop through each row of a set area of a worksheet and delete only those rows which have nothing stored, regardless of whether they have never been used, or, if they once had contents in a cell/s that have since been cleared.  If any cell in the row has had its formatting altered or anything, I still wish it to be considered empty; as long as there is no formula or entry in a cell, I want it detected to be deleted.

1.  My text has the line

If IsEmpty(Range("A1")) then ....

which will test only if a particular cell is empty.

If I try

If IsEmpty(rows(1)) then

there is no compile error, but, if row 1 (1) has nothing in any cell, it still won't match if I have nothing in row 1 of the worksheet.

2.  What is the difference between somthing being empty or something being null?  I have tried other codes with null to try to detect empty lines, but they've caused run errors or again logical ones.

Many thanks to anyone who can assist :-)

GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search