Identify first row of filtered table

Brian F

Active Member
Joined
Aug 31, 2009
Messages
256
I have a table that has been filterers on the basis of this code;

ActiveSheet.Range("$AG$18:$AG$100").AutoFilter Field:=1, Criteria1:= _
"Requires Attention"

The header is row 18. I know the first and last columns and I have the code that will identify the last row. All I need it to know what the first row is and I can do what I need to do with the data. I have searched the intertubes and the "solutions" I've found don't seem to work.

Can anyone give me the code to identify the row number of the first row of a filtered table?
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
r = ActiveSheet.Range("$AG$19:$AG$100").SpecialCells(xlCellTypeVisible)(1).Row


This would set a range variable to all the filtered visible cells
Set rng = ActiveSheet.Range("$AG$19:$AG$100").SpecialCells(xlCellTypeVisible)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,973
Messages
6,122,534
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top