Row number of filtered row
Hi,
Areas is what you want
Area 1 = heading
Area 2 = First visible row etc
so this returns the row number of the second visible row
Sub Macro2()
If ActiveSheet.FilterMode = True Then
x = ActiveSheet.UsedRange.SpecialCells _
(xlCellTypeVisible).Areas(3).Row
End If
End Sub
Mike
"DZ" wrote:
I need to get the row number of the second visible row in the current region.
The current region is filtered.
Example
If the current region starts at row 6, the second visible row is 28 because
the current region is filtered.
The following returns 7, because it not looking at visible rows only. I want
the return value to be 28, the second VISIBLE row.
Dim intRowNumber As Integer
intRowNumber = ActiveCell.CurrentRegion.Rows(2).Row
Thanks
|