COUNTIFS that only counts Unique entries

RodneyW

Active Member
Joined
Sep 24, 2010
Messages
475
Office Version
  1. 2013
Platform
  1. Windows
I'm using this formula and it works exactly as designed.

=COUNTIFS($F$8:$F$10000,"*",$A$8:$A$10000,"*")

How can I modify it so that it only counts unique entries in column A.

Thanks in advance
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Since you don't have the Function Unique, I improvised by adding a helper column that counted the number of occurrences of each item in column A: B8=COUNTIF(A$8:A8,A8)

Then I could one more criteria in your formula: =COUNTIFS($F$8:$F$10000,"*",$A$8:$A$10000,"*",$B$8:$B$10000,1)
 
Upvote 0
Or, without a helper column...

Excel Formula:
=SUM(IF(FREQUENCY(IF(ISTEXT(A8:A10000),IF(ISTEXT(F8:F10000),MATCH("~"&A8:A10000&"|"&F8:F10000,A8:A10000&"|"&F8:F10000&"",0))),ROW(A8:A10000)-ROW(A1)+1)>0,1))

Note that the formula will take into consideration formula blanks ( "" ), just like your original formula.

Hope this hleps!

Edited

The formula needs to be confirmed with CONTROL+SHIFT+ENTER, not just ENTER.
 
Last edited:
Upvote 0
Solution
Or, without a helper column...

Excel Formula:
=SUM(IF(FREQUENCY(IF(ISTEXT(A8:A10000),IF(ISTEXT(F8:F10000),MATCH("~"&A8:A10000&"|"&F8:F10000,A8:A10000&"|"&F8:F10000&"",0))),ROW(A8:A10000)-ROW(A1)+1)>0,1))

Note that the formula will take into consideration formula blanks ( "" ), just like your original formula.

Hope this hleps!
I'm getting a #VALUE! error. In this formula, what is expected to be in cell A1?
 
Upvote 0
Sorry, I forgot to mention that you need to confirm the formula with CONTROL+SHIFT+ENTER, not just ENTER. And, it should return a unique count of text values, including formua blanks ( "" ).
 
Upvote 0
Sorry, I forgot to mention that you need to confirm the formula with CONTROL+SHIFT+ENTER, not just ENTER. And, it should return a unique count of text values, including formua blanks ( "" ).
CONTROL+SHIFT+ENTER worked perfectly. Thank you
 
Upvote 0
Since you don't have the Function Unique, I improvised by adding a helper column that counted the number of occurrences of each item in column A: B8=COUNTIF(A$8:A8,A8)

Then I could one more criteria in your formula: =COUNTIFS($F$8:$F$10000,"*",$A$8:$A$10000,"*",$B$8:$B$10000,1)
Thanks for the reply. I just got all of the replies here and I started with the other one and it worked perfectly
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

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