Hello,
I'm looking for a macro that scans through 5000 rows of data and as soon as it find #N/A in a particular cell under Column "C", deletes that row and the next 20 rows from the worksheet. Please help!
Hello,
I'm looking for a macro that scans through 5000 rows of data and as soon as it find #N/A in a particular cell under Column "C", deletes that row and the next 20 rows from the worksheet. Please help!
Here is what you need... I found this and modified and seems to work fine. Test it first so you don't delete good data.
Please Login or Register to view this content.
Deleted.
Edit: Read incorrectly about 20 cells offset
Last edited by HSV; 03-28-2013 at 05:51 PM.
Kind regards, Harry.
Another option:
Please Login or Register to view this content.
Thanks all of you for your replies. My problem is that I'm using a macro to copy paste data from like 7 different tabs and paste it on one tab. Since I copy a range, there are a bunch of empty rows below #N/A cell. The N/A cell is since I have multiple dropdowns and If i dont select a dropdown it shows up as N/A. Now since I may have to do this operation 5 times, since my selection would change, my new sheet may not be sheet1. Thus the above macro would only work for Sheet1 not the current sheet. Could you change the code so that it deletes these rows in the current selected worksheet rather than sheet1
I think you want to change the line:
To this:Please Login or Register to view this content.
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks