I need a macro to look at each row in a sheet and if on that row column F is blank then I want the macro to delete that entire row.
I need a macro to look at each row in a sheet and if on that row column F is blank then I want the macro to delete that entire row.
Oops, nevermind. Got it.
I was too hasty. What I have doesn't work. When column F is blank and I run the macro and there is other data in other columns on the same row it does not delete the row. This is my code:
I want it to start on row 4 and look to the very last row of data.
My code above only seems to delete one row at a time if the required conditions are met each time I run it.Please Login or Register to view this content.
Last edited by ScabbyDog; 02-21-2013 at 10:44 AM.
or
Please Login or Register to view this content.
Regards, John55
If you have issues with Code I've provided, I appreciate your feedback.
In the event Code provided resolves your issue, please mark your Thread as SOLVED.
If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.
...enjoy -funny parrots-
Ah yes thanks John. Anyway to start this code only looking down from row 4?
Why not just filter Column F for blanks and then select all of the resulting rows and delete them? Edit > Delete Row.
Remove the filter and job done.
Why the headlong rush to VBa
[EDIT]
Apply the filter to Row 3, (Your header Row?)
Last edited by Marcol; 02-21-2013 at 11:01 AM.
If you need any more information, please feel free to ask.
However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....
Also
اس کی مدد کرتا ہے اگر
شکریہ کہنے کے لئے سٹار کلک کریں
If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.
This code is part of a much larger piece of code and clearing the blanks in column F from row 4 onwards allows the rest of the code to run properly.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks