Delete Entire Row based ALL Blank Cells and Formula Errors

newatmacros

New Member
Joined
Jun 23, 2016
Messages
18
I have been exhausting myself trying to appropriately create a macro that delete entire rows in my worksheet A2:LastRow of data based on certain criteria
I have been working on creating a macro that deletes entire rows of all data if anywhere in the row there is a blank cell. Unfortunately, the ones that I have created always come up in an error due to overlapping with some rows containing more than one blank cells. I also need to add to this formula to delete rows if it has an error formula. Again, I encountered the same error with creating this as well.
One macro for both of these commands is ideal.
Any help will be greatly appreciated!
Thanks!
 

My Aswer Is This

Well-known Member
Joined
Jul 5, 2014
Messages
16,304
You said:
"that deletes entire rows of all data if anywhere in the row there is a blank cell"

So each row has 16,384 cells so are you saying you really have all 16,384 cells filled with data sometimes.
 

newatmacros

New Member
Joined
Jun 23, 2016
Messages
18
Hi My Answer Is This!
Thanks for responding. Well I am creating this macro to deal with data that may not be consistent. Basically I need it to check to the last cell of the data in the row. So, it doesn't have to search 16,384 cells; but it has to be designed to search through each data filled cell of each row no matter what has been placed in the worksheet. Does this answer your question?
 

My Aswer Is This

Well-known Member
Joined
Jul 5, 2014
Messages
16,304
So your not able to provide what is the last column to look in?
Will the last column to look in always have a header in row (1)
If neither of these questions can be answered then how do I know what is the last column to look in.
We are not looking for cells with data we are looking for cells with no data.
So for example if row 3 had data in all cells all the way over to column 12
But row 4 only had data in all cells all the way to column 3 then this row would be deleted.

And when you say delete the row of all data does that mean clear the row of all data or delete the row.
 

newatmacros

New Member
Joined
Jun 23, 2016
Messages
18
Hi My Answer Is This!
The thing is the headers may change. I actually don't want to do anything in the headers. I want to select and search through all of the data below the headers. So if one entire row has just one blank cell, I want the whole row deleted, just like you would manually delete and all the cells would automatically move up. Does that make sense?
I know there must be away to have a search that just goes through the first cell of data and ends at the last cell of data; however, I don't know how to do this with rows.
 

Forum statistics

Threads
1,082,585
Messages
5,366,466
Members
400,892
Latest member
lamarh755

Some videos you may like

This Week's Hot Topics

Top