Counting Unique Values by Person

mathewrtaylor

New Member
Joined
Aug 28, 2014
Messages
5
Hey Team, I've been racking my brain on this, and either I'm over complicating or overlooking it.

Here's the scenario:

Addy 1
Addy 2
Addy 1
Addy 4
Addy 4
Addy 3
Bart 1
Bart 1

I'd like to count the number of unique values (regardless of what the numbers are). The desired output is: Addy 4, Bart 1. I've been trying to see how to do this, but other than adding an identifier along the original data (which I don't particularly want to do) and adding that number, I can't see an alternative. Any suggestions or recommendations?

This site has been a primary source of knowledge for me over the years and the first time I couldn't find an answer, so finally registered!

Mathew
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Welcome to the Board!

One way would be to use the Remove Duplicates functionality to remove all the duplicates, and then count the remaining names.
You might be able to use Pivot Tables or Subtotals to get those counts for each person without having to create a formula for each one or use VBA.
 
Upvote 0
maybe something like...


E2 =SUM(IF(FREQUENCY(IF(($A$2:$A$9=D2)*($B$2:$B$9<>""),$B$2:$B$9),$B$2:$B$9),1)) Control shift enter

A
B
C
D
E
1
2
Addy
1
Addy
4
3
Addy
2
Bart
1
4
Addy
1
5
Addy
4
6
Addy
4
7
Addy
3
8
Bart
1
9
Bart
1

<TBODY>
</TBODY>
 
Upvote 0
Welcome to the Board!

One way would be to use the Remove Duplicates functionality to remove all the duplicates, and then count the remaining names.
You might be able to use Pivot Tables or Subtotals to get those counts for each person without having to create a formula for each one or use VBA.

I'm really trying not to do any destructive editing, so trying to avoid VBE though certainly a last ditch effort. Thanks for the suggestion!

Mathew
 
Upvote 0
maybe something like...


E2 =SUM(IF(FREQUENCY(IF(($A$2:$A$9=D2)*($B$2:$B$9<>""),$B$2:$B$9),$B$2:$B$9),1)) Control shift enter

ABCDE
1
2Addy1Addy4
3Addy2Bart1
4Addy1
5Addy4
6Addy4
7Addy3
8Bart1
9Bart1

<tbody>
</tbody>

This works like a charm! This is an area where I don't have a great breadth of work; array formulas. Thanks greatly for the suggestion, solved my issue!

Mathew
 
Upvote 0
Weazel's suggestion does not involve any VBA or deleting/removing any data.
What might be a pain is coming up with the list of unique names in column D (if your data is quite long).
However, there is a quick formulaic way you can do that too. See: How to extract a unique distinct list from a column in excel | Get Digital Help - Microsoft Excel resource

So if you combine that with Weazel's suggestion, you should be able to get what you want without any VBA or without having to delete out any data rows.
 
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