Forum Discussion
Deleting blank rows in excel..... but not deleting partially blank rows
- Jul 04, 2018
Dear Community.
It was suggested that I should share the information that helped me on the forum so that everyone can benefit from it. I totally agree. So here it is:
Suppose your last column with data is column Z.
Add this formula to AA1:
=COUNTA(A1:Z1)
Double-click the fill handle to fill down (double-check if all rows are filled with the formula, if not, copy down as far as needed).
Now turn on filter and filter the table for the value of zero in that new column.
Use goto special, blanks now and do the delete. Then remove the filter.
I also have the same question.
I am not an expert by a longshot, but I do have to manage excel reports for work so it would help me to figure this out as well.
My reports are simple and don't use functions or queries. I just need to delete the rows that have no information at all. I've been unable to find step by step instructions for this which do not remove the rows with partial information. Any assistance would be appreciated. Thanks!
Ms. Burtis
copy your data to the sample attached and test it.
do not test directly on your work.. always have a back-up copy of your works.
hope this helps..
thanks
- JBurtisAug 30, 2018Copper Contributor
Hello,
Thanks that works in the document you submitted. How do I get it to work on my spreadsheet now? I tried to run it on a copy of work and it errors out (see attached).
- Lorenzo KimAug 30, 2018Bronze Contributor
Ms. Burtis
1. copy your data to the file I attached below (overwrite the previous one)
2. try it - if it worked then maybe you would want to save it as your filename.
hope this helps.
thank you..
- Jeff DaltonOct 12, 2018Copper ContributorThank you Lorenzo Kim. Just starting with VBA myself and appreciate you base code.
In your sample sheet how would you change the code to check only one column for either 0 or no data? For example, there will always be data in column A and B, but I want to either Hide or Delete an entire row if Column C = 0 or is blank.