pliskers
Active Member
- Joined
- Sep 26, 2002
- Messages
- 461
- Office Version
- 2016
- Platform
- Windows
I'm using the following code to capture the contents of a cell in the last row of a data table and then reference that row number to capture the "distname". The table has its header in row 11.
lastrow = Range("F" & Rows.Count).End(xlUp).Row
distname = Range("F" & lastrow)
Although the data is filtered, the code is capturing the last row in the entire table, including the filtered rows. I've searched for a simple modification to capture the last VISIBLE, FILTERED row but no luck so far.
Any help would be greatly appreciated!
lastrow = Range("F" & Rows.Count).End(xlUp).Row
distname = Range("F" & lastrow)
Although the data is filtered, the code is capturing the last row in the entire table, including the filtered rows. I've searched for a simple modification to capture the last VISIBLE, FILTERED row but no luck so far.
Any help would be greatly appreciated!