Excel - A formula to count a list of names

Ask a question
For users who are struggling with handling Microsoft Excel when trying to copy the same name multiple times without making it confusing, a simple procedure needs to be followed. A list of names in a report may be generated, where the same name appears multiple times. With column 'A' having a list of names, where the same name is repeated, and the user desires to display all the names in column 'B', but only once. With this issue, it is required to use the Filter and Advanced Filter options from the Data menu dropdown list. Using the radio button and the 'copy-to' options, it is required to choose the 'unique records only' option to solve this issue.


I have a list of names that will change as reports are generated. The report will include the same name multiple times, so the name joebloggs could appear 10 times. I need a formula to scan COL:A that has the list of names.
In COL:B i would like Excel to display each of the different names that are in COL:A but only once. So, for example, JOEBLOGGS would appear in B2 only once. Then in COL:C I would like the total amount of times that name appeared in that list. So for example:

A B C       
1 joebloggs JOEBLOGGS 5       
2 joebloggs       
3 joebloggs       
4 joebloggs       
5 joebloggs 

These names will vary so I cannot specify the names using countif function. I need Excel to populate the names in B automatically.


Suppose your data is like this from A1 to A9 (note column heading - this is necessary)
  • Click on Data(menu)-Filter-AdvancedFilter
  • Choose radio button at the top "copy to another location"
  • Next to the list range click on the icon at the right end of the small window and highlight A1 to A9
  • Leave blank criteria range
  • Next to "copy to"-click on the icon at the right end of the window and select some empty cell e.g. D1
  • Choose "unique records only" at the bottom left
  • Click on OK
  • you will get D1 to D4 names


in E2 copy paste this formla (repeat E2)

copy E2 down.

You will get names frequency
a 4       
s 2       
d 2       


Thanks to venkat1926 for this tip on the forum.
Jean-François Pillou

CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jeff Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.

Learn more about the CCM team