Counting unique values

liampog

Active Member
Joined
Aug 3, 2010
Messages
308
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi

I have 2 columns, Names in Column A and Training Course in Column B.

Sometimes there will be a duplicate Name and Training Course with a different date in Column C.

I'm trying to count the number of UNIQUE names that have taken the Training Course.

So if Joe Bloggs has done the H&S training course 3 times on 3 different dates, I want it to just count him ONCE.

Hope this makes sense.

Thanks
Liam
 
Last edited:

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Hi Joe

Thanks for the reply but it's not quite what I'm after. It might help to include some sample data.

You'll see the total count includes ALL instances of each course and then the unique count only counts ONE instance of someone doing the course .

Hope this helps.

JoeH&S10/01/2017
JohnH&S10/02/2017
ChristineSW12/03/2017
JohnSW12/04/2017
JoeH&S11/05/2017
ChristineSW12/06/2017
MaryJBS15/07/2017
JohnJBS12/08/2017
ChristineJBS12/09/2017
JohnH&S12/10/2017
JoeSW12/11/2017
JoeJBS12/12/2017
COURSETOTAL COUNTUNIQUE COUNT
H&S42
SW43
JBS44

<tbody>
</tbody>
 
Upvote 0
OK, using complex array formulas is really not my strong suit, but I can get the Unique Counts with using a Helper column.
Let's say that your data is in Range A1:C12. Then I added a helper column in column D to identify duplicates.
I placed the following formula in D1 and copied down to D12.
Code:
=IF(COUNTIFS(A$1:A1,A1,B1:B$1,B1)>1,"DUP","")
Then, let's say that your total counts are at the bottom, with "H&S" in row 17.
Then place this formula is cell C17 and copy down to C19:
Code:
=COUNTIFS(B$1:B$12,A17,D$1:D$12,"<>" & "DUP")
You can even hide the helper column if you do not want to see it.
 
Upvote 0

Forum statistics

Threads
1,215,444
Messages
6,124,893
Members
449,194
Latest member
JayEggleton

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