Update formula to count unique visible

tezza

Active Member
Joined
Sep 10, 2006
Messages
382
Office Version
  1. 2016
  2. 2010
Platform
  1. Windows
  2. Web
HI All

Hope you can help.

I've got this formula below in a spreadsheet:

Excel Formula:
=COUNTA(UNIQUE($M$2:$M$10231))

How do I update this to count the visible unique values in the same range?

I've tried what I figured to be a logical solution (as 103 = counta) but it just throws up an error:

Excel Formula:
=subtotal(103,UNIQUE($M$2:$M$10231))

Regards
Tez

edit: 365 version
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Maybe
Excel Formula:
=AGGREGATE(3,7,UNIQUE($M$2:$M$10231))
 
Upvote 0
HI, that's shows a #VALUE! for wrong data type. My data is text if that helps.
It was just a guess, my fault, I can't reconstruct situation on Excel 2010 with example data because of absence of UNIQUE function in this version.
Lets wait for an answer from other forum users...
 
Upvote 0
I've no idea how this works but it does, found it in another thread here and adapted it to my sheet:

Excel Formula:
=SUM(IF(FREQUENCY(IF(SUBTOTAL(3,OFFSET(M2:M10231,ROW(M2:M10231)-ROW(M2),0,1)), IF(M2:M10231>"",MATCH("~"&M2:M10231,M2:M10231&"",0))),ROW(M2:M10231)-ROW(M2)+1),1))

I'm baffled by the complexity of it lol but will keep it here for safe keeping.
 
Upvote 0
Solution

Forum statistics

Threads
1,223,705
Messages
6,173,985
Members
452,540
Latest member
haasro02

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