Target last row of filter, get cell data

Gil149

Board Regular
Joined
Oct 11, 2010
Messages
144
I am trying to target the last row of a filtered range (using autofilter) and get the value in the "O"column. I have tried a few methods but I cannot seem to grab the cell value. Everything returns the row number. Using Excel 2003 and stumped!
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Try:

Code:
Range("O" & Rows.Count).End(xlUp).Value
 
Upvote 0
MrKowz, thank you. I was trying to target with the .specialcell(xlcelltypevisible) because every other approach produced results from non filtered, yours worked!
 
Upvote 0
I am trying to target the last row of a filtered range (using autofilter) and get the value in the "O"column. I have tried a few methods but I cannot seem to grab the cell value. Everything returns the row number. Using Excel 2003 and stumped!

If a numeric value expected...

Control+shift+enter, not just enter:

=LOOKUP(9.99999999999999E+307,IF(SUBTOTAL(3,OFFSET(O2:O100,ROW(O2:O100)-ROW(O2),,1)),O2:O100))

If a text value is expected...

Control+shift+enter, not just enter:

=LOOKUP(REPT("z",255),IF(SUBTOTAL(3,OFFSET(O2:O100,ROW(O2:O100)-ROW(O2),,1)),O2:O100))
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,738
Members
452,940
Latest member
Lawrenceiow

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