Counting unique combinations within dates

collo

New Member
Joined
Jan 2, 2018
Messages
5
Public
12017
Public22018
Private32017
Private32018
Private42018

<tbody>
</tbody>

So I'm trying to count the number of unique combinations of the first two columns, then according to the date.

I currently have:
{=SUM(--(FREQUENCY(IF($A:$A="Public",MATCH($B:$B,$B:$B,0)),ROW($B:$B)-ROW($B$1)+1)>0))}

Which will count the number of unique combinations, however I don't know how to incorporate the date parameter into this.
Possibly using SUMPRODUCT?
Something along the lines of:
{=SUMPRODUCT(--(FREQUENCY(IF($A:$A=$E11,MATCH($B:$B,$B:$B,0)),ROW($B:$B)-ROW($B$2)+1)>0)*(C:C=2018))}
It just comes out as #VALUE

Thanks in advance
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Maybe this array formula (enter with CTFL-SHIFT-ENTER):
Code:
=SUM(--(FREQUENCY(IF($A:$A="Public",IF($C:$C=2018,MATCH($B:$B,$B:$B,0))),ROW($B:$B)-ROW($B$1)+1)>0))
 
Upvote 0
Just a little extra since it's actually a date range I'm dealing with, not just a year.

Is there a good way to place an AND in the IF where the - $C:$C=2018 - is?
Can't seem to get it to work.

Thanks again
 
Upvote 0
Try this:
Code:
=SUM(--(FREQUENCY(IF(A:A="Public",IF(YEAR(C:C)=2018,MATCH(B:B,B:B,0))),ROW(B:B)-ROW($B$1)+1)>0))
 
Upvote 0
Apologies, I didn't explain that very well.

It needs to be within the tax year so needs two include results in a range between two dates.
FIX:
I've amended the original data to fit to a yearly basis, so yes the YEAR(C:C) works now.

If there is a better way to do it feel free.

Thanks
 
Upvote 0

Forum statistics

Threads
1,214,780
Messages
6,121,527
Members
449,037
Latest member
tmmotairi

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