AutoFilter & Selecting First Visible Cell

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
 
J

Jacob Skaria

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
 
G

GerryGerry

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
 

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