Various

How to count the number of occurrences in a list with functions in Excel

Having a list of values, for example city names, and want to know how many times each unique entry is repeated ?

How to count the number of occurrences in a list with a pivot table in Excel : List of values with multiple occurences
List of values with multiple occurences

Here’s a simple solution, using built in functions.

See also with pivot table

Start by copying the list, and pasting it in another column. With the pasted data selected, click on menu option DATA > Remove Duplicates. This will allow you to have one column with all values, and one column with unique values only.

How to count the number of occurrences in a list with functions in Excel : Copy data in a new column and apply Remove Duplicates
Copy data in a new column and apply Remove Duplicates

In the Remove Duplicates menu, make sure you have selected the right column, and uncheck in case there is no header

How to count the number of occurrences in a list with functions in Excel : Remove Duplicates options
Remove Duplicates options

A confirmation message should be displayed, showing how many entries and unique values the list contains

How to count the number of occurrences in a list with functions in Excel : Remove Duplicates operation result summary
Remove Duplicates operation result summary

Then, next to the first entry of the unique values, enter the following function, to count how many times it occurs in the full list

=countif([column with full list];[first value])

How to count the number of occurrences in a list with functions in Excel : Creation of a countif formula on entries and values
Creation of a countif formula on entries and values

See the first result, extend the formula to all unique values

How to count the number of occurrences in a list with functions in Excel : Extension of the countif formula for all values
Extension of the countif formula for all values

And voilà ! Here the result is displayed, with number of entries for each value

How to count the number of occurrences in a list with functions in Excel : Unique values with count of entries
Unique values with count of entries