ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   AutoFilter & Selecting First Visible Cell (https://www.excelbanter.com/excel-programming/434370-autofilter-selecting-first-visible-cell.html)

Simon

AutoFilter & Selecting First Visible Cell
 
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

Jacob Skaria

AutoFilter & Selecting First Visible Cell
 
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
---------------
Jacob Skaria


"Simon" wrote:

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


GerryGerry

AutoFilter & Selecting First Visible Cell
 
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
"Simon" wrote in message
...
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





All times are GMT +1. The time now is 02:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com