hi all,
As Kelly questioned "what do you mean by sorting?", "Sorting" & "Filtering" are two separate & different functionalities in Excel.
Assuming you mean that the rows aren't being filtered below row 140...
If a single cell (or the header row) is selected then the range of the autofilter is "guessed" by Excel. I think it uses the "currentregion" (ie the area around the current selection that is bordered by empty cells) to try & identify the appropriate range. You can get the address of the range used by the autofilter through the VBE's Immediate pane:
choose the sheet that the autofilter is on.
in Excel, press [alt + F11] to open the VBE.
press [ctrl + g] to open the Immediate pane in the VBE
type& press [enter] to give the answer.![]()
?activesheet.AutoFilter.Range.Address
To fix your current problem & to be certain that all the necessary rows are included, I suggest removing your current autofilter, selecting the entire range* (not just the headers) before re-applying the Autofilter. Now any new data rows that are added directly below the initial range become included in the autofilter range, however new data rows aren't added to the autofilter range if a blank row is between the existing range & the new data.
*Any blank rows in the initial range will now be included in the range acted on by the autofilter.
hth
Rob
Bookmarks