Link to home
Start Free TrialLog in
Avatar of jana
janaFlag for United States of America

asked on

How to find the first and last cell value of a Filtered data in Excel

Hi,

I am trying to determine the last and first data (first/last row display in the filter result) filtered in data range.  is there a function or formula that would help in that?
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

lngFirstRow =  ActiveSheet.AutoFilter.Range(1).Row

lngLastFiltRow = ActiveSheet.UsedRange.SpecialCells(xlCellTypeLastCell).Row
Avatar of jana

ASKER

Via VBA is the only way? Can it be done on the worksheet cells directly?
Avatar of jana

ASKER

Or better yet, how can I use MIN and MAX in a filtered column?
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jana

ASKER

Thanx!
You’re welcome and I’m glad I was able to help.

If you expand the “Full Biography" section of my profile you’ll find links to some articles I’ve written that may interest you.

Marty - Microsoft MVP 2009 to 2017
              Experts Exchange Most Valuable Expert (MVE) 2015, 2017
              Experts Exchange Top Expert Visual Basic Classic 2012 to 2018
              Experts Exchange Top Expert VBA 2018
              Experts Exchange Distinguished Expert in Excel 2018
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jana

ASKER

Thank u byundt!