7 Methods to Find Duplicates in Two Columns in Excel

There are great tools and commands to find duplicates in two or more columns in Excel that will ease your work and save a lot of time to treat lengthy datasheets. In this article, I will show you 7 easy methods to find duplicates in two columns in Excel.

Find Duplicates in Two Columns with Conditional Formatting

To find and highlight duplicates in two columns in Excel using Conditional Formatting, follow these steps:

  1. Select the two columns that you want to compare.
  2. Navigate to the Home tab in the Excel ribbon.
  3. Click on Conditional Formatting in the Styles group.
  4. Now, go to Highlight Cells Rules > Duplicate Values.
  5. In the Duplicate Values dialog, check that Duplicate is selected.
  6. Choose a formatting style from the Values with drop-down.
  7. Finally, hit OK.

Shortcut Method to Find Duplicates in Two Columns in Excel

Find Duplicates in Two Columns in Excel with Logical Formula

To find the duplicate names in columns, I have a list of brands around the world here below.

Dataset to find Duplicate in Excel

Now to check the duplicates in two columns in Excel, follow the following steps:

  1. Add a new column. I have named the new column ‘Result’.
  2. Write this formula in the first cell of that column: =A2=B2Use the True/False Logical Formula to Find Duplicates in Two Columns in Excel
  3. Then press ENTER.Showing FALSE If it does not contain duplicates in Excel
    If there is a match between the columns, the result will be TRUE. If there is a mismatch, the result will be FALSE.
  4. Now double-click on the Fill Handle.
  5. Usage of True/False to Find Duplicates in Two Columns in Excel The results will come up as TRUE or FALSE indicating a match or mismatch respectively.Indicate Duplicates using True/False in Two Columns in Excel

Find Duplicates in Two Columns in Excel Using IF Function

Using the IF function is another easy way to find the similarities and dissimilarities between two distinct columns. It gives a more expressive result than the first one I personally feel.

To apply the IF function to find duplicates in two columns in Excel:

  1. Create a new column first. I have named the new column header ‘Result’.
  2. Write this formula in the first cell of the new column: =IF(A2=B2,”Duplicate”,”Different”)Use the IF Function to Find Duplicates in Two Columns in ExcelIn this formula, A2=B2 depicts a logical test. If the value is true, the result will be Duplicate. If the value is false, the result will be Different.
  3. Then press ENTER.Returning "Different" after comparing two columns in Excel
  4. Now drag the Fill Handle to the end of the column (C2:C12).Updated the result with Different and Duplicate to show the duplicate in Excel

Instead of the words Duplicate and Different, you can use other words also. Such as ‘Match and Mismatch’, ‘Positive and Negative’, ‘Same and Unique’ etc.



Find Duplicates in Two Columns in Excel by Creating New Rule 

Highlighting can make your work of sorting duplicate characters very easy. It works great especially when you are in a hurry because you can look at the colored cells quickly.

To find and highlight duplicates in two columns in Excel by creating a new rule, follow these steps:

  1. Select the two columns you want to compare.
  2. Then go to the Home tab.Selection of data range and accessing the Home tab to find duplicates
  3. Click on the Conditional Formatting in the Styles group.the Conditional Formatting drop-down
  4. Now hit ‘New Rule’ from the Conditional Formatting drop-down list.‘New Rules’ from the Conditional Formatting drop-down list
    A dialog box called New Formatting Rule will come along.
  5. From the dialog box, select Use a Formula to Determine Which Cells to Format as a rule type.
  6. Now type this formula inside the Format Values Where This Formula Is True bar: =$A1=$B1Use New Rule to Find Duplicates in Two Columns in Excel
  7. Then click on the Format button. The Format Cells dialog box will show up.
  8. Now, change the Background Color under the Fill section as per your preference. For example, I have used yellow to highlight.
  9. Hit OK to save the changes.

Format Cells to indicate Duplicates in Two Columns in Excel This will highlight the cells which have the same characters located in the same row and they are easy to find out in this way if the list is overlong.Highlighted the cells with duplicate data in Excel

Find Duplicates in Two Columns in Excel & Output Third by VLOOKUP

This method is only applicable where we need to compare two columns with some similar names or values and at the end, the comparison will return a result in the third column co-related with the 1st column names/values.

For instance, I have a list of Product Codes in the column named Product Code and their prices in the column Price. Product Code-2 has some of the same products as column A (Product Code) and the final result will return the values in column F (Price-2) corresponding with column B (Price).

Dataset to find duplicates with VLOOKUP function

To match two columns in Excel and return data from a third column:

  1. Select a cell.
  2. Type the following formula: =VLOOKUP(E2,$A$2:$B$12,2,FALSE)Use VLOOKUP Function to Match Two Columns and Output Third in Excel
  3. After that, press the ENTER key.Updated the result with price of the product with list in Excel
  4. Now drag down the Fill Handle over the range of cell range F2:F6.Using Fill Handle to drag down the formula with VLOOKUP function

And done! You will get your desired results this way.Match Two Columns and Output Third in Excel

Find Duplicates in Two Columns in Excel Using Duplicate Values Command 

To find duplicated in two columns in Excel with Duplicate Values command, go through these steps below:

  1. Select the two columns you want to compare.Dataset to find duplicates in Excel with duplicate values
  2. Then go to the Home tab from the ribbon.
  3. Click on the Conditional Formatting drop-down in the Styles group.
  4. Now put the cursor on the Highlight Cells Rules command and click on Duplicate Values from the new drop-down list.Use the ‘Duplicate Values’ Command to Find Duplicates in Excel
    The Duplicate Values dialog box will come along.
  5. Check that the “Duplicate” option is selected.Duplicate Values dialog box: Use the ‘Duplicate Values’ Command to Find Duplicates in Excel
  6. Change the formatting style in the Values with drop-down.
    Highlighted Duplicates with the Duplicate Values command in Excel I choose the Light Red Fill highlight and here is the end result in the image below:Output of the Usage of the ‘Duplicate Values’ Command to Find Duplicates in Excel


Find Duplicates in Two Columns by IF & COUNTIF Functions Returning Difference

These steps will compare two columns in Excel and show the unique values as the difference between the columns:

  1. Create a new column. I have created a new column in Column C and named it Matches.
  2. Now write this formula on the top cell of the column: =IF(COUNTIF($B$2:$B$12,$A2)=0,””,$A2)Usage of If function to Compare Two Lists and Return Differences in ExcelThe formula checks if the value in cell A2 exists in the range from B2 to B12. If it’s found, it copies the value from A2; if not, it leaves the cell blank.
  3. Press ENTER.Returning matched duplicate value with IF and COUNTIF functions
  4. After that, drag the Fill Handle down from cell C2 to cell C12.Output: Compare Two Lists and Return Differences in Excel

How to Count Duplicates in Excel

Suppose you have a lengthy list of names and you want to count how many times one name is repeated. This method will do that for you.

List of brands to find duplicates with the list

Here is a long list of different brand names. To count the duplicates within a list, follow these steps:

  1. First, create two new columns to find the duplicate values. I have named them Brands-2 and Count.Created two new columns to store the output finding duplicates in Excel
  2. Insert the values that you want to count their number of occurrences.Inserted the data to count the duplicates in Excel
  3. Insert the following formula in cell D2: =COUNTIFS(A2:A20,C2)Use COUNTIFS Function to Count Duplicates in Excel
  4. Press ENTER. It will show the formula result.Returning the count of the brands name in Excel with COUNTIFS function
  5. Finally, drag the Fill Handle down from D2 to D5.Output: Count Duplicates in Excel


Conclusion

I hope you got an overall idea about all possible techniques to find the duplicate values in columns in Excel. Use whichever method you feel comfortable with. Also if you have any questions or confusion regarding this topic, feel free to comment here. I will try to respond as soon as possible.

Frequently Asked Questions

What is the fastest way to find duplicates in Excel?

The fastest way to find duplicates in Excel is by using the Conditional Formatting feature:

  1. Select the column or range where you want to find duplicates.
  2. Go to the Home tab.
  3. Click on Conditional Formatting.
  4. Choose Highlight Cells Rules and then Duplicate Values.

Excel will instantly highlight duplicate values in the selected range, allowing for quick identification and analysis.

How do I filter only duplicates?

To filter only duplicates in Excel, use the following steps:

  1. Select the column containing potential duplicates.
  2. Go to the Data tab.
  3. Click on Remove Duplicates.
  4. Choose the column(s) where you want to find duplicates.
  5. Click OK.

This will filter and display only the duplicate values in the selected column(s). Verify and manage duplicates as needed.

5/5 - (3 votes)

2 Comments

  1. This is really good information but hasn’t helped what I am trying to accomplish. Maybe you may be able to get me in the right direction.

    I have a master list of part numbers with the quantities three different locations have on hand. On another workbook I have a list of the parts each location has on order.

    I am trying to compare the master list of items to the list of orders. I can run different formulas but I think having the same part number ordered is throwing the formulas off. I was simply trying to run a rule to get a true/false next to the item number on the master list if it has been ordered.

    1. Thank you for your comment and for sharing your specific scenario. I understand that comparing part numbers between the master list and the list of orders can be a bit tricky, especially if the formulas are impacted by the presence of the same part number in both lists.

      To achieve your goal of marking items on the master list as “ordered” or “not ordered,” you can use a combination of formulas or methods in Excel. Here’s a suggestion:

      On the master list sheet, you can use the VLOOKUP function or INDEX and MATCH functions to check if each part number in the master list exists in the list of orders.

      This would involve creating a new column next to the item numbers with a formula like:
      =IF(ISNUMBER(MATCH(A2, Orders!$A$2:$A$100, 0)), “Ordered”, “Not Ordered”)

      Here, A2 is the reference to the part number in the master list, and Orders!$A$2:$A$100 is the range of part numbers on the orders sheet.

      Please adjust the cell references and ranges based on the actual layout and size of your data. If you encounter any specific challenges or have additional requirements, feel free to provide more details, and I’d be happy to assist you further.

Leave a Reply

Your email address will not be published. Required fields are marked *