count unique occurences with two criteria

dark11984

New Member
Joined
Sep 9, 2008
Messages
10
Hi I'm trying to count unique occurences of a column when two other columns meet the criteria. The formula i'm trying to get to work is below but I keep getting a #N/A. Can anyone help?

Code:
=SUM(IF(FREQUENCY(IF(RED_Delivery_Query!$I$2:$I$2200<>"",IF(RED_Delivery_Query!$D$2:$D$2200=$C4,
   IF((RED_Delivery_Query!$H$2:$H$2200=H$3),
    MATCH("~"&RED_Delivery_Query!$I$2:$I$2200&"",0)))),
     ROW(RED_Delivery_Query!$I$2:$I$2200)-ROW(RED_Delivery_Query!$I$2)+1),1))

Thanks
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Try...
Code:
=SUM(IF(FREQUENCY(IF(RED_Delivery_Query!$I$2:$I$2200<>"",
    IF(RED_Delivery_Query!$D$2:$D$2200=$C4,
    IF(RED_Delivery_Query!$H$2:$H$2200=H$3,
     MATCH("~"&RED_Delivery_Query!$I$2:$I$2200,
       RED_Delivery_Query!$I$2:$I$2200&"",0)))),
     ROW(RED_Delivery_Query!$I$2:$I$2200)-
       ROW(RED_Delivery_Query!$I$2)+1),1))
 
Upvote 0

Forum statistics

Threads
1,215,497
Messages
6,125,157
Members
449,208
Latest member
emmac

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