Keeping numbers clean even after filtering
Applying a filter to hide some rows makes ordinary sequential numbers look sparse and out of order. Using the SUBTOTAL function keeps the numbering based only on the rows currently visible, so it always counts cleanly from 1.
Pair it with your auto-filter workflow
This technique works especially well alongside a standard auto-filter setup, since you can leave the numbering formula in place permanently and it will keep adjusting correctly no matter how the filter criteria change.
Frequently Asked Questions
What does the number 103 in SUBTOTAL actually mean?
103 is a function code that means 'calculate COUNTA while ignoring hidden rows' β it excludes both rows hidden by a filter and rows hidden manually.
Does the numbering stay correct if I sort the data?
Yes. After sorting, the formula recalculates and renumbers rows according to whatever order is currently visible on screen, so the sequence is always accurate.