I am making an Excel macro to filter things, and therefore delete unnecessary rows. First I create a range of irrelevant cells (by making the union of them), and after that I delete the whole row for the given range.
deleteRng.EntireRow.Delete
So if I have a worksheet with 100 rows and the rows from 40 to 60 are irrelevant, that range is deleted and the rows from 60 to 100 shifted up, so totally I got 80 rows counted from 1 to 80. This works perfectly most of time, but with some special workbooks the row numbers not updated after the deletion, therefore in the previous example the rows counted like 1...40,61...100.
Is there a workbook related setting which do this or what else could be the problem?