Link to home
Start Free TrialLog in
Avatar of discogs
discogs

asked on

true row count of filtered range

Hi there,

In excel 2010 I have a filtered range called data. When I filter it using criteria,  I want to return the true row count of only the visible cells or filtered results.

Does  anyone have any idea on how  I can do this with vba?

TA
Avatar of helpfinder
helpfinder
Flag of Slovakia image

use SUBTOTAL formula
like =SUBTOTAL(2,your_range)
Avatar of discogs
discogs

ASKER

Hi thanks for your answer.

I am trying to integrate this into a vba function that does other thing.

That said, I was more looking for something like:

MyTrue Count = Intersect(.SpecialCells(xlCellTypeVisible), .Range(.Rows(2), .Rows(.Rows.Count)))

Open in new window


TA
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 discogs

ASKER

Perfect! That's exactly what I was looking for..
You're welcome and I'm glad I was able to help.

In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2014