Formula to return count of unique values in one column, for each different value in another column

aldousjg

New Member
Joined
Jan 20, 2021
Messages
16
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I'm having trouble with a formula which needs to return a count of unique names found in one column for each unique combination of number and date found in two other columns. Hopefully this example explains it a bit better:

1611650406804.png


So for the combination of 123 and 01/01/2000, there is one unique name in the Names column and a value of 1 is returned, but for the combination of 456 and 03/03/2000, there are three unique names in the names column and a value of 3 is returned.

My actual dataset is a few thousand rows and I would now be able to specify actual values of number or date in a formula.

Could anyone help?

Thank you,
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
You Can Use Countifs that have multiple criteria range and Criteria for each Range.
 
Upvote 0
count unique items with 2 conditions.xlsx
D
22
Blad1
Cell Formulas
RangeFormula
D2D2=SUM(IF(--FREQUENCY(IF(($A$2:$A$16&"|"&$B$2:$B$16=A2:A2&"|"&B2:B2),MATCH($C$2:$C$16,$C$2:$C$16,0)),IF(($A$2:$A$16&"|"&$B$2:$B$16=A2:A2&"|"&B2:B2),MATCH($C$2:$C$16,$C$2:$C$16,0)))>0,1))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Solution
Another option
Excel Formula:
=ROWS(UNIQUE(FILTER($C$2:$C$1000,($A$2:$A$1000=A2)*($B$2:$B$1000=B2))))
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,751
Members
448,989
Latest member
mariah3

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