Quantcast
Viewing latest article 10
Browse Latest Browse All 445

Row numbers not updated after deleting entire rows

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.

Image may be NSFW.
Clik here to view.
SO33965610 question example

Is there a workbook related setting which do this or what else could be the problem?


Viewing latest article 10
Browse Latest Browse All 445

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>