# How to Count Duplicates in Excel

To count duplicates in Excel, you can use the COUNTIF function. The COUNTIF function allows you to count the number of times a specific value appears in a range of cells. Follow these steps to count duplicates in Excel:

- Open your Excel workbook and locate the data you want to count duplicates for.
- In an empty cell, type the following formula:=COUNTIF(range, criteria)Where "range" is the range of cells you want to search for duplicates, and "criteria" is the value you want to find the duplicates of.
- Replace "range" with the actual range of cells you want to search for duplicates. For example, if your data is in cells A1 to A10, the range will be A1:A10.
- Replace "criteria" with the value you want to count duplicates for. You can either type the value directly into the formula or use a cell reference that contains the value.
- Press Enter to complete the formula. The result will show the number of times the specified value appears in the given range.

## Example

Let's say you have a list of names in column A, and you want to count the number of times "John" appears in the list.

- In an empty cell (e.g., B1), type the following formula:=COUNTIF(A1:A10, "John")
- Press Enter.
- The result in cell B1 will show the count of "John" in the range A1:A10.

If you want to count duplicates for multiple values, you can use a separate COUNTIF formula for each value or use a PivotTable to summarize the data.

To count duplicates for all values in the range, you can use the following steps:

- In an empty column (e.g., column B), type the following formula in the first cell (B1):=COUNTIF(A:A, A1)
- Press Enter.
- Copy the formula down to the rest of the cells in column B, corresponding to the data in column A. You can do this by clicking on the small box at the bottom-right corner of cell B1 and dragging it down.
- The numbers in column B will show the count of duplicates for each value in column A.

Did you find this useful?