Function Problems

How to Count How Many Times Each Name Appears in Excel

Muhammad TalhaMuhammad Talha Oct 15, 2026 872 views

Question details

The user needs a formula to determine how many times specific individual names appear within a given Excel dataset.

How to Count How Many Times Each Name Appears in Excel
Product
Excel
Device & OS
not provided
Scenario
Analyzing a list of data to find the exact frequency of occurrences for each unique name in a specific range.
Observed behavior
A summarized list showing each unique name alongside its total count of appearances is generated.
Before you start

Ensure your dataset does not contain trailing spaces or inconsistent formatting, as Excel treats 'John' and 'John ' as two completely different names.

Solution 1Recommended

Use the COUNTIF Function with a Unique List

The most straightforward and reliable method for counting specific items is to use the COUNTIF function alongside a column of unique names.

The COUNTIF function requires two arguments: the range of your entire data, and the specific criteria (the name) you want to count. Generating a unique list of names first makes this process much faster.

1
Extract unique names

Place or extract your unique list of names into a separate column (e.g., Column B). You can copy the original list and use Data > Remove Duplicates to create this.

2
Enter the COUNTIF formula

In the adjacent cell (e.g., C2), enter the formula =COUNTIF(A:A, B2), assuming your raw name data is located in Column A.

3
Apply to all names

Select cell C2 and drag the fill handle down to apply the counting formula to all the unique names in Column B.

Use the COUNTIF Function with a Unique List
Pro Tip for Newer Versions: In newer spreadsheet versions, you can automatically generate the unique list in Column B by typing =UNIQUE(A2:A100) in cell B2.
Efficient Data Analysis

Count Data Easily with WPS Spreadsheet

WPS Office provides a highly capable spreadsheet application that supports all standard Excel functions, including COUNTIF, UNIQUE, and FILTER. You can effortlessly manage and analyze your datasets without changing your regular workflow.

  1. 1. Open your data file: Launch WPS Spreadsheet and open your .xlsx file containing the raw list of names.
  2. 2. Apply the COUNTIF formula: Select an empty cell right next to your target name and type =COUNTIF(A:A, B2).
  3. 3. Fill the series: Press Enter, then drag the bottom-right fill handle downwards to calculate the frequencies for all names simultaneously.
Fully supports COUNTIF, COUNTIFS, and advanced dynamic array formulas for frequency analysis.Seamless format compatibility with Microsoft Excel (.xlsx) files.Lightweight, free to use, and runs smoothly on Windows, Mac, and Linux.
microsoft office alternative - wps office

Frequently Asked Questions

Why is COUNTIF returning 0 for a name that exists in my list?

This usually happens due to hidden characters or trailing spaces. Use the TRIM function on your data range (e.g., =TRIM(A2)) to clean the text formatting before using COUNTIF.

How do I count names that are case-sensitive?

The standard COUNTIF function is not case-sensitive. To count strictly matching cases, you need to use the SUMPRODUCT and EXACT functions together, like this: =SUMPRODUCT(--EXACT(B2, A:A)).

Can I count how many different (unique) names there are in total?

Yes. In modern spreadsheet versions, you can combine functions by typing =COUNTA(UNIQUE(A2:A100)) to find the total number of distinct names present in your dataset.