To be honest, you would run into problems with your code other than trying to check both M and N.
If you loop through the rows from 1 down and delete rows during that, the code will end up skipping over some rows and not checking them at all.
What I posted looks from the last row up, so when a row is deleted it does not affect the loop.