Marking duplicate rows in Excel is usually done by applying a conditional formatting rule that highlights cells matching the criteria, or by using the built-in Filter to visually separate non-unique entries. This approach highlights duplicates without deleting the underlying data, allowing you to review and verify which rows are considered identical before taking action.

What You'll Need

  • A computer with Microsoft Excel installed (Excel 2013 or later is recommended for the best features).
  • A dataset containing the data you wish to check for duplicates. This data should ideally be clean, meaning you have removed any accidental leading or trailing spaces that might make 'Apple' look different from 'Apple '.

Step-by-Step

  1. Select your data: Click on any cell within the dataset you want to check for duplicates. This ensures Excel selects the entire contiguous block of data automatically.
  2. Open the Conditional Formatting menu: Navigate to the "Home" tab on the ribbon. In the Styles group, locate and click the "Conditional Formatting" button. From the dropdown menu, select "Highlight Cells Rules" and then choose "Duplicate Values..." from the sub-menu.
  3. Review the default rule: The "Duplicate Values" dialog box will appear. By default, it will likely be set to "Duplicate" in the left dropdown menu. This is exactly what we want to identify rows that appear more than once.
  4. Choose a highlight style: In the right dropdown menu (the "Format with" section), you can choose how to highlight the duplicates. Common styles include "Light Red Fill with Dark Red Text". You can also click "Custom Format..." to pick your own colors or font styles, though standard highlighting is usually sufficient for quick identification.
  5. Apply the rule: Click the "OK" button to apply the formatting. Excel will immediately scan the selected range and apply the chosen highlight to all rows that contain data matching other rows in the list.
  6. Filter for duplicates (Optional but Recommended): To focus specifically on the duplicate rows and hide the unique ones, click the small arrow in the header of the column you analyzed. In the filter dropdown, uncheck "Select All" and then check only the specific color or category you applied (e.g., if you used red, check "Red Text" or the specific red fill). This isolates the duplicates for review.

Common Mistakes

One of the most common reasons duplicates aren't found is the presence of invisible characters. For example, a cell might look like it contains "Smith" but actually contains "Smith" followed by a non-breaking space or a tab character. Excel sees these as different values. Always use the "Trim" function (TRIM) on your data columns before checking for duplicates to remove these hidden whitespace characters.

Another mistake is applying the rule to a single column when you need to find entirely identical rows. If you only check the first column, a row with unique data in column A but duplicate data in column B will not be flagged. To flag entire rows, you must select the entire block of columns that make up your data range before applying the rule.

Tips

For larger datasets, using the built-in Filter is often faster than scrolling through a heavily highlighted spreadsheet. Once duplicates are highlighted, use the Filter feature to isolate them, then you can copy and paste these rows to a new sheet for further analysis or cleanup.

If you need to count the number of duplicate entries rather than just highlight them, you can use the formula =COUNTIF(range, cell_reference) > 1. This returns TRUE if the cell value appears elsewhere in the range, which can then be used to sort or filter your data.

Troubleshooting

If you apply the rule and nothing happens, double-check that you have selected the correct range of cells. Conditional formatting only applies to the cells currently selected. If your data is not contiguous (e.g., there are blank rows separating your data), you may need to select the non-contiguous blocks manually by holding the Ctrl key while selecting them.

If you see duplicates where there shouldn't be any, check for hidden characters. Sometimes data copied from the web or imported from a database will contain invisible line breaks or special characters. Using the TRIM function and the CLEAN function can often resolve these phantom duplicates.

Frequently Asked Questions

Can I highlight only unique values instead of duplicates?

Yes. In the "Duplicate Values" dialog box, change the dropdown menu from "Duplicate" to "Unique". Excel will then highlight every row that does not appear anywhere else in the dataset.

Does this method delete the duplicate rows automatically?

No. Conditional formatting only changes the visual appearance of the cells. It does not alter, move, or delete the underlying data. You will still need to manually delete the rows or use a different method to remove them.

How do I highlight duplicates based on multiple columns?

You must select the entire block of columns that constitute your data set before opening the Conditional Formatting menu. If you only select one column, Excel will only check for duplicates within that single column, ignoring the other columns in the row.

Can I use a formula to mark duplicates instead of conditional formatting?

Yes. You can use the =COUNTIF($A$2:$A$100, A2) > 1 formula in a helper column. This checks the range against the current cell and returns TRUE if a duplicate is found, which can then be used to filter or sort your data.

Why are my duplicates not being found even though they look the same?

This is almost always due to invisible characters like spaces, line breaks, or special symbols. Ensure you have cleaned your data using the TRIM and CLEAN functions before performing the duplicate check.