Getting occurrence within an excel column even when the column is filtered

Hi,

We use this formula to get the occurrence of items within a column ("=SUM(IF(FREQUENCY(MATCH(B10:B64781,B10:B64781,0),MATCH(B10:B64781,B10:B64781,0))>0,1))").  However, we need to place filters in the columns and want to reflect the occurrence as the items being filtered.  We took a look at "=SUBTOTAL" but can't get it work as we want it.

Is there a way to this?
rayluvsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Please give this a try...
=SUM(IF(FREQUENCY(IF(SUBTOTAL(3,OFFSET(B10,ROW(B10:B64781)-ROW(B10),,1)), IF(B10:B64781<>"",MATCH("~"&B10:B64781,B10:B64781&"",0))),ROW(B10:B64781)-ROW(B10)+1),1))

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rayluvsAuthor Commented:
Gave me a "Circular Reference Warning".

I have included an excel with a small data.  I placed the formula I usually use without filter = the result is 8 unique register (but since I can't set filter, it stays 8).
EEfilter.xlsx
0
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You were getting the circular reference warning because you placed the formula cell (B4) itself in the formula.

Please refer to the attached.
EEfilter.xlsx
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

rayluvsAuthor Commented:
Thanx worked!

However, when I copied the formula over to my working excel (the same cell B4) but says says "#VALUE!".  Noticed in your excel that the formula is in brackets but when I go into it,the brackets disappear - do i  have to do something to activate the formula?
0
rayluvsAuthor Commented:
Ok, I had to ctrl-shift.

Ok thanx
0
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
That's right. Since it is an Array Formula, you need to confirm it with Ctrl+Shift+Enter instead of Enter alone.
0
rayluvsAuthor Commented:
Thank you very much!

May I bother you for a bit of explanation of the formula?

formukaEE
0
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
In SUBTOTAL(3, 3 is for COUNTA so the Subtotal formula is finding the visible cells with some content in them and so the Frequency output is filtered based on the Subtotal criteria as well and in the end you get the unique count from the visible cells.
0
rayluvsAuthor Commented:
Thanx!
0
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You're welcome!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.