Count the amount

bjurney

Active Member
Joined
Aug 24, 2009
Messages
320
I have a list of around 500 names but they are not all diffrent. I am trying to figure out a formula to determine how many diffrent names are in this list.

For example:

Tom
Tom
David
Eric
Tom

would return 3.

I assume it might be a sumproduct formula, but I am not so good with the array formulas so not sure how to do it.
Thanks for the help
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
What about a CountIF formula and then perhaps use find duplicates in the Filter options and copy to separate sheet
 
Upvote 0
Try this:

=SUM(IF(FREQUENCY(IF(LEN(A1:A500)>0,MATCH(A1:A500,A1:A500,0),""), IF(LEN(A1:A500)>0,MATCH(A1:A500,A1:A500,0),""))>0,1))

This needs to be confirmed with control+shift+enter and not jsut enter.

Hope that helps.
 
Upvote 0
Thanks Schielrn, that is exactly what I needed, never would have figured that out on my own!
 
Upvote 0
I have a list of around 500 names but they are not all diffrent. I am trying to figure out a formula to determine how many diffrent names are in this list.

For example:

Tom
Tom
David
Eric
Tom

would return 3.

I assume it might be a sumproduct formula, but I am not so good with the array formulas so not sure how to do it.
Thanks for the help

Less expensive, that is, faster...

Control+shift+enter, not just enter:

=SUM(IF(FREQUENCY(IF(A2:A6<>"",MATCH("~"&A2:A6,A2:A6&"",0)),ROW(A2:A6)-ROW(A2)+1),1))
 
Upvote 0

Forum statistics

Threads
1,224,617
Messages
6,179,915
Members
452,949
Latest member
beartooth91

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