Filtered Rows

S

shimeel

in the spreadsheet i am using filter
and in one of the macros, i need to select the first visible row below
the header.

The header is at row 10.
eg .

row10: header
row11 - 90: (filtered out, not viewable)
row91: first visible row below row 10

i need the macro to select row 91 in this case

how can i do that.
 
M

Myrna Larson

This example may help you get started

Dim Rng As Range
Set Rng = Range("A10").CurrentRegion._
Offset(1, 0).SpecialCells(xlCellTypeVisible)
Debug.Print Rng.Areas(1).Row

Working code would need to check whether the first visible row is outside the
list range (i.e. whether all rows have been filtered out or not)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top