AutoFilter & Selecting First Visible Cell

  • Thread starter Thread starter Simon
  • Start date Start date
S

Simon

Hi,

I have an AutoFilter which will display one row of data (one visible row), I
want to be able to grab the value from the 5th column in that one visible
row. How can I do this?

Thanks.
Simon
 
Here is one way. The below macro assumes you have header in Row 1

Sub Macro()
Dim lngRow As Long
lngRow = 1
Do
lngRow = lngRow + 1
Loop Until Rows(lngRow).Hidden = False
MsgBox Cells(lngRow, 5)
End Sub

If this post helps click Yes
 
you can use the worksheet function subtotal this will allow you to capture
the visible row

something like '=SUBTOTAL(109,E2:E1000)'

Please post back if this was helpful
 
Back
Top