James Snyder
Well-known Member
- Joined
- Jan 11, 2013
- Messages
- 618
I am working on solving a problem where I get every other row deleted instead of every row. The situation is that I am using Autofilter to find empty cells in a column that shouldn't have empty cells. Before I can delete them, I need to add them to an array for exceptions handling. This means I need to step through the filtered range and record each unique ID for followup, then delete them. If I delete as I go, the "For Each" doesn't work on the original rows, but works on an increment. This means a deleted row causes the range to shift up one, and I end up deleting every other row.
I know I can solve this by deleting separately from recording them, but am searching for a way to work with the "For Each" maybe using a "Step -1" or something similar. Does anyone have any ideas?
I know I can solve this by deleting separately from recording them, but am searching for a way to work with the "For Each" maybe using a "Step -1" or something similar. Does anyone have any ideas?