this is my first post on SO, so I hope I am doing this correctly.
I am trying to delete rows from my data that meet the following conditions:
- First column's value is different from the cell below it
- Third column's value is equal to the cell below it
A sample of my code looks like this:
For Each Cell In MyRangeA3
If Cell.Value <> Cell.Offset(1).Value Then
If Cell.Offset(, 2).Value = Cell.Offset(1, 2).Value Then
Cell.Offset(1).EntireRow.Delete
End If
End If
Next Cell
The problem I am facing is that my macro goes to the next cell as such I have to rerun my macro again in order to remove the next row that meets my conditions. What should I add to my code in order to do this in one run?