I'm having difficulties with deleting rows, I know why it's doing it (because the dewend range is being deleted) but I can't figure out how to correct it Thanks in advance!
Please Login or Register to view this content.
I'm having difficulties with deleting rows, I know why it's doing it (because the dewend range is being deleted) but I can't figure out how to correct it Thanks in advance!
Please Login or Register to view this content.
Hi,
Your code is very long, so I haven't read it thoroughly. If this solution doesn't fix your problem, please upload your workbook so I can see the code working and breaking. Please also indicate what the result should look like and where the actual result is going wrong.
When I have this problem, I find there's 2 solutions:
1. Try looping through the rows in reverse order (if this is an option)
2. When a row is deleted, decrement your incremental loop variable so that it repeats that same value.
I hope this helps
Hi, the generally acccepted method of looping when you are deleting rows is to start at the bottom and work up....type syntax.Please Login or Register to view this content.
Like ajryan88 I havent read the code to understand what the macro is trying to do but step -1 from the bottom is regarded as "best practice"
Cheers
Jmac1947
1. Please consider clicking on the * Add Reputation if you think this post has helped you
2. Mark your thread as SOLVED when question is resolved
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks