List of names, how many different names do i have

YukonBrad

New Member
Joined
Dec 18, 2006
Messages
14
Hello Everyone,

Like most things I do in Excel, it seems like it shouldn't be that hard but, well here I am, again :)


I have a column full of names, all of the names are repeated at some point. I am trying to find a formula that would tell me the number of different names in that given row. So, if i have 500 rows of names this formula would give the result of XX different names in the 500 rows.

I hope this makes sense, I thought it would be a CountIf formula but I couldn't figure it out.

Many thanks for any help.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
YukonBrad,


Something like this?


Excel Workbook
ABC
1Oranges3
2Oranges
3Grapes
4Apples
5Grapes
6
Sheet2
 
Upvote 0
Hello Everyone,

Like most things I do in Excel, it seems like it shouldn't be that hard but, well here I am, again :)


I have a column full of names, all of the names are repeated at some point. I am trying to find a formula that would tell me the number of different names in that given row. So, if i have 500 rows of names this formula would give the result of XX different names in the 500 rows.

I hope this makes sense, I thought it would be a CountIf formula but I couldn't figure it out.

Many thanks for any help.
If you "only" have 500 rows of data try this simple formula:

=SUMPRODUCT((A1:A500<>"")/COUNTIF(A1:A500,A1:A500&""))

If you have "a lot" of rows of data try this array formula**:

=SUM(IF(FREQUENCY(MATCH(A1:A500,A1:A500,0),ROW(A1:A500)-ROW(A1)+1),1))

** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.

Assumes no empty cells within the data range.
 
Upvote 0

Forum statistics

Threads
1,224,594
Messages
6,179,792
Members
452,942
Latest member
VijayNewtoExcel

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