79328090

Date: 2025-01-04 02:00:38
Score: 1
Natty:
Report link

I feel like you have to loop and you know how to build a loop. Your error probably comes from deleting the row above where you are at when it moves up to the next iteration. Excel really only likes deleting the row you are on or previous ones you have visited. And, of course, as you designed it, when deleting rows, you should process from the bottom to the top.

Instead of deleting the row above when conditions are met, don't. Your "If" should only delete the row you are on or the one you came from. In other words, check down, not up.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Don of the Dead