Function Problems

How to Count Repeated Names or Employee Numbers in Excel

Steve KSteve K Nov 10, 2026 871 views

Question details

The user needs to count the number of times a specific name or employee number appears in an Excel column.

How to Count Repeated Names or Employee Numbers in Excel
Product
Excel
Device & OS
not provided
Scenario
Summarizing employee data or identifying duplicate entries.
Observed behavior
To obtain the exact count of specific names or IDs, or to generate a complete summary report of all repeated entries.
Before you start

Ensure your data column does not have leading or trailing spaces, as these can affect the accuracy of functions and PivotTables when counting duplicates.

Solution 1Recommended

Use the COUNTIF Function to Count Specific Names or Numbers

The COUNTIF function is perfect for finding exactly how many times a specific name or employee number appears in a designated range.

The COUNTIF function searches through a specified range and returns the number of cells that match your exact criteria. This method is highly effective when you want a quick answer for a single employee or a specific subset of names without altering your data layout.

1
Select the destination cell

Click on an empty cell where you want the counted result to appear.

2
Enter the COUNTIF formula

Type `=COUNTIF(A:A, 34678)` replacing 'A:A' with the column containing your data, and '34678' with the specific employee number you are searching for.

3
Use cell references for dynamic counting

Alternatively, if the employee number is stored in another cell (like E2), use the formula `=COUNTIF(A:A, E2)`.

4
Press Enter

Hit Enter on your keyboard to execute the formula and view the total count of that specific name or employee number.

Use the COUNTIF Function to Count Specific Names or Numbers
Wildcard Support: You can use wildcards like '*' or '?' in your COUNTIF criteria if you only know part of the name or employee ID.
Manage Employee Data with WPS Office

Easily Count Duplicates Using WPS Spreadsheet

WPS Spreadsheet supports all advanced Excel functions, including COUNTIF and powerful PivotTables, allowing you to accurately track employee numbers, summarize duplicates, and analyze data for free.

  1. 1. Open data file in WPS: Launch WPS Spreadsheet and open the document containing your employee data.
  2. 2. Use COUNTIF function: To count specific duplicates, enter `=COUNTIF(A:A, "Your criteria")` in an empty cell.
  3. 3. Insert a PivotTable: For a full report, go to Insert > PivotTable and select your data range.
  4. 4. Drag fields to summarize: Drag your target field into both the Rows and Values areas to instantly count duplicates.
Fully compatible with Microsoft Excel (.xlsx) formats.Includes a rich library of formulas, including COUNTIF and COUNTIFS.Easy-to-use PivotTable features for quick data summarization.Lightweight software with a familiar, user-friendly interface.
microsoft office alternative - wps office

Frequently Asked Questions

Why is COUNTIF returning 0 when the employee number is clearly in the list?

This usually happens due to formatting mismatches or hidden spaces. Ensure both your criteria cell and the data column are formatted identically (e.g., both as Text or both as Numbers). You can also use the TRIM function to remove accidental spaces in your data.

Can I count how many times an employee number appears with multiple conditions?

Yes, you can use the COUNTIFS function, which allows you to set multiple criteria across different ranges. For example, `=COUNTIFS(A:A, E2, B:B, "Present")` will count the occurrences of the employee number in column A only if column B says 'Present'.

Why does my PivotTable show 'Sum of Employee Number' instead of 'Count'?

Excel and WPS Spreadsheet automatically default to 'Sum' when the data in the Values area consists of numbers. To fix this, click on the field in the Values area, select 'Value Field Settings', and change the summary function from 'Sum' to 'Count'.