Get instant live expert help with Excel or Google Sheets
“My Excelchat expert helped me in less than 20 minutes, saving me what would have been 5 hours of work!”

Post your problem and you'll get expert help in seconds

Your message must be at least 40 characters
Our professional experts are available now. Your privacy is guaranteed.

Find duplicate values in two columns

Working with big amount of data often requires us to identify duplicate values.Microsoft Excel has made finding duplicates very easy. We can combine the COUNTIF and AND functions to find duplicates between columns. In this tutorial, we will learn how to find duplicate values in two columns in Excel.

Figure 1. Example of How to Find Duplicate Values in Two Columns

Generic Formula

=AND(COUNTIF(range1, value1),COUNTIF(range2, value1))

How this formula works

This formula is based on the COUNTIF function. It returns a count of all the values in both range1 and range2. The values returned by COUNTIF will either be zero (0) or a positive number in both ranges. Excel will represent the zeros as FALSE and the positive numbers as TRUE.

The two COUNTIF functions are nested inside an AND function. This will return TRUE if both counts are positive. Otherwise, it will return FALSE. The TRUE instances will represent the duplicate values in the two columns.

Setting Up Data

The following example contains some sample fruit names. Column A and B has these names.

Figure 2. The Example Data Set

To find out whether the names in column B are duplicates, we need to:

  • Go to cell C2.
  • Assign the formula =AND(COUNTIF($A$2:$A$6, A2),COUNTIF($B$2:$B$6, A2)) in C2.
  • Press Enter.

Figure 3. Applying the Formula

  • Drag the formula from cells C2 to C6 using the fill handle on the bottom right.

Column C will now show TRUE for the values pineapples and mangoes which are duplicates.

Excel has made working with duplicates very simple. As we saw, combining COUNTIF and AND functions can quickly find out duplicates in two columns. However, we can  use conditional formatting to display a more visual result.

Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.

Are you still looking for help with Conditional Formatting? View our comprehensive round-up of Conditional Formatting tutorials here.

Did this post not answer your question? Get a solution from connecting with the expert.

Another blog reader asked this question today on Excelchat:

Leave a Comment

avatar

Subscribe to Excelchat.co

Get updates on helpful Excel topics

Subscribe to Excelchat.co

Did this post not answer your question?
Get a solution from connecting with the expert

Another blog reader asked this question today on Excelchat:

Post your problem and you'll get expert help in seconds

Your message must be at least 40 characters
Our professional experts are available now. Your privacy is guaranteed.
Trusted by people who work at
Amazon.com, Inc
Facebook, Inc
Accenture PLC
Siemens AG
Macy's
The Allstate Corporation
United Parcel Service
Dell Inc