Unique count based on two criteria

MichelleC987

New Member
Joined
Dec 6, 2017
Messages
5
Good Morning,

I'm looking for some assistance on a formula that will provide a count of unique instances in column B, when Column A is "No". I have success with (=SUMPRODUCT(1/COUNTIF($B$2:$B$9,$B$2:$B$9))), but all is lost when I try to change the COUNTIF to a COUNTIFS to encompass the additional criteria as illustrated below.

This workbook will be used by many users with limited excel background; therefore I would prefer to not include an array formula that would require (Ctrl+Shift+Enter) to calculate. Due to a limitation by the excel file type itself, I cannot apply VBA to this workbook. Any help would be greatly appreciated. Thank you!!

ClosedName1/COUNTIF($B$2:$B$9,$B$2:$B$9)
NoTest0.333333333
YesTest10.25
NoTest0.333333333
NoTest21
NoTest10.25
YESTest0.333333333
NoTest10.25
NoTest10.25
SUMPRODUCT(1/COUNTIF($B$2:$B$9,$B$2:$B$9))3
SUMPRODUCT(1/COUNTIFS($A$2:$A$9,"No",$B$2:$B$9,$B$2:$B$9))3.83333

<colgroup><col span="2"><col><col></colgroup><tbody>
</tbody>
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
If VBA and arrays are off the table, I think the only solution to get a count of unique values may be the advanced filter. If you use the advanced filter on column A as "No" and include column B and check the "Unique records only" box, that should give you a new table of all the records of "No" with a unique list of values in column B. You can then use a COUNTA formula to count the results.

The other way would be to just copy the filtered table to a different range and run the Remove Duplicates tool, then a COUNTA to pull your count.
 
Upvote 0
That worked! I haven't heard of the advanced filter feature before, there are a few other workbooks that can utilize this feature. Thank you for solving the problem and teaching me a cool new tool!
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,716
Members
448,985
Latest member
chocbudda

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