Sum unique values with multiple criteria

JohnnyAngel

Board Regular
Joined
Apr 18, 2011
Messages
65
Looking for a formula to sum unique values with multiple criteria.

I need to sum the number of unique Store numbers, by "CHG" status, by a specific Salesperson "John", by a specific dollar amount ">0".

The formula I would imagine would look something like this:

=SUM(IF(FREQUENCY(IF(H20:H1777="CHG",IF(Q20:Q1777="John", IF(P20:P1777>0,(C20:C1777,C20:C1777)>0,1))


I appreciate your help.
<table style="width: 286px; height: 207px;" border="0" cellpadding="0" cellspacing="0"><col style="width: 49pt;" width="66" span="2"> <col style="width: 52pt;" width="69"> <col style="width: 64pt;" width="85"> <tbody><tr style="height: 13.8pt;" height="18"> <td class="xl71" style="height: 13.8pt; width: 49pt;" width="66" height="18">
</td> <td style="vertical-align: top;">
</td><td class="xl71" style="border-left: medium none; width: 49pt;" width="66">
</td> <td class="xl71" style="border-left: medium none; width: 52pt;" width="69">
</td> <td class="xl71" style="border-left: medium none; width: 64pt;" width="85">
</td> </tr> <tr style="height: 13.8pt;" height="18"> <td class="xl71" style="height: 13.8pt; border-top: medium none;" height="18">
</td> <td style="vertical-align: top;">
</td><td class="xl71" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 13.8pt;" height="18"> <td class="xl71" style="height: 13.8pt; border-top: medium none;" height="18">
</td> <td style="vertical-align: top;">
</td><td class="xl71" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 13.8pt;" height="18"> <td class="xl71" style="height: 13.8pt; border-top: medium none;" height="18">
</td> <td style="vertical-align: top;">
</td><td class="xl71" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 13.8pt;" height="18"> <td class="xl71" style="height: 13.8pt; border-top: medium none;" height="18">
</td> <td style="vertical-align: top;">
</td><td class="xl71" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 13.8pt;" height="18"> <td class="xl71" style="height: 13.8pt; border-top: medium none;" height="18">
</td> <td style="vertical-align: top;">
</td><td class="xl71" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 13.8pt;" height="18"> <td class="xl71" style="height: 13.8pt; border-top: medium none;" height="18">
</td> <td style="vertical-align: top;">
</td><td class="xl71" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 13.8pt;" height="18"> <td class="xl71" style="height: 13.8pt; border-top: medium none;" height="18">
</td> <td style="vertical-align: top;">
</td><td class="xl71" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">
</td> </tr> <tr style="height: 13.8pt;" height="18"> <td class="xl71" style="height: 13.8pt; border-top: medium none;" height="18">
</td> <td style="vertical-align: top;">
</td><td class="xl71" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">
</td> <td class="xl71" style="border-top: medium none; border-left: medium none;">
</td> </tr> </tbody></table>
<table border="0" cellpadding="0" cellspacing="0" width="333"><col style="width: 49pt;" width="66" span="2"> <col style="width: 52pt;" width="69"> <col style="width: 49pt;" width="66" span="2"> <tbody><tr><td style="vertical-align: top;">
</td><td style="vertical-align: top;">
</td><td style="vertical-align: top;">
</td><td style="vertical-align: top;">
</td><td style="vertical-align: top;">
</td></tr><tr style="height: 13.8pt;" height="18"> <td class="xl71" style="height: 13.8pt; width: 49pt;" width="66" height="18">
</td> <td class="xl71" style="width: 49pt;" width="66">
</td> <td class="xl71" style="width: 52pt;" width="69">
</td> <td class="xl71" style="width: 49pt;" width="66">
</td> <td class="xl71" style="width: 49pt;" width="66">
</td> </tr> <tr style="height: 13.8pt;" height="18"> <td class="xl71" style="height: 13.8pt;" height="18">
</td> <td class="xl73">
</td> <td class="xl73">
</td> <td class="xl73" colspan="2" style="">
</td> </tr> <tr style="height: 13.8pt;" height="18"> <td class="xl71" style="height: 13.8pt;" align="right" height="18">
</td> <td class="xl72">
</td> <td class="xl72">
</td> <td class="xl72">
</td> <td class="xl71">
</td> </tr> <tr style="height: 13.8pt;" height="18"> <td class="xl71" style="height: 13.8pt;" align="right" height="18">
</td> <td class="xl72">
</td> <td class="xl72">
</td> <td class="xl72">
</td> <td class="xl71">
</td> </tr> <tr style="height: 13.8pt;" height="18"> <td class="xl71" style="height: 13.8pt;" align="right" height="18">
</td> <td class="xl72">
</td> <td class="xl72">
</td> <td class="xl72">
</td> <td class="xl71">
</td> </tr> <tr style="height: 13.8pt;" height="18"> <td class="xl71" style="height: 13.8pt;" align="right" height="18">
</td> <td class="xl72">
</td> <td class="xl72">
</td> <td class="xl72">
</td> <td class="xl71">
</td> </tr> <tr style="height: 13.8pt;" height="18"> <td class="xl71" style="height: 13.8pt;" align="right" height="18">
</td> <td class="xl72">
</td> <td class="xl72">
</td> <td class="xl72">
</td> <td class="xl71">
</td> </tr> <tr style="height: 13.8pt;" height="18"> <td class="xl71" style="height: 13.8pt;" align="right" height="18">
</td> <td class="xl72">
</td> <td class="xl72">
</td> <td class="xl72">
</td> <td class="xl71">
</td> </tr> <tr style="height: 13.8pt;" height="18"> <td class="xl71" style="height: 13.8pt;" align="right" height="18">
</td> <td class="xl72">
</td> <td class="xl72">
</td> <td class="xl72">
</td> <td class="xl71">
</td> </tr> </tbody></table>
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Try...

=SUM(IF(FREQUENCY(IF(H20:H1777="CHG",IF(Q20:Q1777="John", IF(P20:P1777>0,MATCH("~"&C20:C1777,C20:C1777&"",0)))),ROW(C20:C1777)-ROW(C20)+1)>0,1))

...confirmed with CONTROL+SHIFT+ENTER.
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,702
Members
452,938
Latest member
babeneker

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