Colin Legg
MrExcel MVP
- Joined
- Feb 28, 2008
- Messages
- 3,507
- Office Version
- 365
- Platform
- Windows
Like you, I tend to use Range.Find(). It's normally an option to remove any filtering before I call it. Other than filtering, another thing Range.Find() will miss is if the last cell only contains a prefix character, '. Taking those into account too, I don't think there is a 100% foolproof method to determine the last row without some sort of looping involved.
There's a temptation to try using Range.SpecialCells() [xlCellTypeConstants and xlCellTypeFormulas] and to derive the last cell from those, but there could be problems on large worksheets because the Range.SpecialCells() method has a limitation of 2^13 non-contiguous cells.
There's a temptation to try using Range.SpecialCells() [xlCellTypeConstants and xlCellTypeFormulas] and to derive the last cell from those, but there could be problems on large worksheets because the Range.SpecialCells() method has a limitation of 2^13 non-contiguous cells.