countifs multiple criteria

akswartz85

New Member
Joined
Mar 31, 2010
Messages
49
I'm trying to convert a countifs that currently counts non-unique values into one that counts unique values.

The non-unique formula: =COUNTIFS('FULL RAW'!$H:$H,'Summary - Non Unique Counts'!$A6,'FULL RAW'!$D:$D,"B",'FULL RAW'!$T:$T,"Yes",'FULL RAW'!$P:$P,"High")

How do I convert that into one that returns a unique count?

Thanks!
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
<style type="text/css"><!--td {border: 1px solid #ccc;}br {mso-data-placement:same-cell;}--></style>
Unique IdentifierEngagementEng GroupPolicyElectedCollectiveAdvocacyAlumni RegionAdvocacy Interest 2018Ad Interest ConsolidatedAdvocacy CommitmentADVOCACY Commit ConsolidatedPolicy Interest 2018Policy Interest ConsolidatedPolicy CommitmentPolicy Commit ConsolidatedAppointed Interest 2018PLA YNLPLF YNRPLS YNDPLS YNPASF YNNPAW YN
0034000000y3SMCAA242-5sDBBANational Capital Region2Yes2Low40YesYesNoNoNoNoNo
0034000000y3SgkAAE2b2-5sDBBASouth Dakota2Yes2Low00NoNoNoNoNoNoNo
0034000000zgeMPAAY42-5sC1C2CDIllinois & Northwest Indiana1010I'm not sureNoYesNoNoYesNo
0034000000y3SZwAAM32-5sADCALos Angeles2Yes1Low10I'm not sureNoNoNoNoNoNo
0034000000y3QASAA242-5sEBBC1National Capital Region2Yes1Low00YesNoNoNoNoNoNo
0034000000y3SjuAAE42-5sABBEColorado1010NoNoNoNoNoNoNo
00340000015yEdbAAE52-5sBC1DC2National Capital Region2Yes2Low40YesNoNoNoNoNoNo
0034000001j1p9LAAQ42-5sBC1BC1Sacramento3Yes3Medium00YesNoNoYesNoYesYes

<colgroup><col style="width: 209px"><col width="102"><col width="102"><col width="51"><col width="63"><col width="80"><col width="77"><col width="300"><col width="206"><col width="206"><col width="180"><col width="180"><col width="179"><col width="179"><col width="155"><col width="155"><col width="629"><col width="94"><col width="94"><col width="94"><col width="94"><col width="94"><col width="94"></colgroup><tbody>
</tbody>

Here's a cut of the data. I'm counting col A (unique ID) - essentially, how many unique IDs fit the above criteria?
 
Upvote 0
I've tried this:
=ArrayFormula(sum(--(frequency(if('FULL RAW'!$H:$H='Summary - Non Unique Counts'!$A6)*('FULL RAW'!$D:$D="B")*('FULL RAW'!$T:$T="Yes")*('FULL RAW'!$P:$P="High"),'FULL RAW'!$A:$A),0)))

also this:
=ArrayFormula(((sum(--(frequency(if('FULL RAW'!$H:$H = 'Summary - Non Unique Counts'!$A6)*('FULL RAW'!$D:$D="B")*('FULL RAW'!$T:$T="Yes")*('FULL RAW'!$P:$P="High"),'FULL RAW'!$A:$A),'FULL RAW'!$A:$A),'FULL RAW'!$A:$A),'FULL RAW'!$A:$A)>0))

Errors on both, and I'm not sure why.

(I'm in Google Sheets, hence =arrayformula instead of the traditional {})
 
Last edited:
Upvote 0
Control+shift+enter, not just enter (I leave out the sheet name for convenience) in Summary - Non Unique Counts:

=SUM(IF(FREQUENCY(IF($A$2:$A$400<>"",IF(($H$2:$H$400=$A6)*($D$2:$D$400="B")*($T$2:$T$400="Yes")*($P$2:$P$400="high"),MATCH($A$2:$A$400,$A$2:$A$400,0))),ROW($A$2:$A$400)-ROW(INDEX($A$2:$A$400,1,1))+1),1))
 
Upvote 0

Forum statistics

Threads
1,214,987
Messages
6,122,618
Members
449,092
Latest member
amyap

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