Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to find unique/duplicate values between two columns in excel?

For example, I have two columns of different length filled with student names, and now I want to compare these two columns to select all values in column A but not in column B, and select all values in column B but not in column A. That means selecting unique values between two columns. If I compare them cell by cell, it will be very time-consuming. Are there any good ideas to find out all unique values between two columns in Excel quickly?

Find unique/duplicate values between two columns with formula

Find and count unique /duplicate values between two columns with formula of Kutools for Excel

Find unique/duplicate values between two columns with Kutools for Excel

Quickly find and select all duplicate/unique values in a column in Excel

Easily find and select/highlight unique or duplicate values between two columns in Excel

Kutools for Excel’s Select Same & Different Cells utility can help you quickly compare two columns, and then select or highlight the same/different cells between two columns, or select/highlight the entire rows based on the same/different cells between two columns. Full Feature Free Trial 30-day!

ad select unique values between two lists

Office Tab Enable Tabbed Editing and Browsing in Office, and Make Your Work Much Easier...
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
  • Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
  • More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words...
  • Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum...
  • Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns...
  • Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Create Mailing List and Send Emails by Cell's Value...
  • Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
  • More than 300 powerful features; Works with Office 2007-2019 and 365; Supports all languages; Easy deploying in your enterprise or organization.

The following formula can also help you to find the unique values, please do as this:

In a blank cell B2, enter this formula =IF(ISNA(VLOOKUP(A2,$C$2:$C$13,1,FALSE)),"Yes",""), and then drag this cell's AutoFill Handle to the cell B15.

If the unique values stay only in Column A but not in Column C, it will be displayed Yes in column B; while if return nothing in Column B, it means corresponding value stays in both Column A and Column C. See screenshot:

Notes:

(1) In the above formula, A2 is the column which you want to be compared. And the $C$2:$C$13 is the range that you want compared with.

(2) If you want to list the unique values only in Column C but not in Column A, you can apply this formula: =IF(ISNA(VLOOKUP(C2,$A$2:$A$15,1,FALSE)),"Yes","").

note ribbon Formula is too complicated to remember? Save the formula as an Auto Text entry for reusing with only one click in future!
Read more…     Free trial

Actually, the Kutools for Excel also provides a similar Count times a word appears formula to check and count the unique values between two columns in Excel. Please do as follows:

1. Select a blank cell beside the the first column, in our case we select the Cell B2, and click Kutools > Formula Helper > Count times a word appears. See screenshot:

2. In the opening Formula Helper dialog box, please specify the absolute address of the second column ( $C$2:$C$13 in our case) into the Text box, select the first item of the first column (A2 in our case) into the Word box, and click the OK button.

3. And then drag this cell's AutoFill Handle to the range as you need.

And then each item's occurrence in the Column C has been counted out. 0 means corresponding item is unique between two columns. While other numbers, such as 1 means corresponding value exists in the Column C and appears once in the Columns C. See left screenshot:

Kutools for Excel - Includes more than 300 handy tools for Excel. Full feature free trial 30-day, no credit card required! Get It Now


Actually, Kutools for Excel develops a Select Same & Different Cells utility to help Excel users to compare two lists and find/count/highlight the same values or unique values between them easily. Please do as follows:

1. Click Kutools > Select > Select Same & Different Cells.

2. In the Select Same & Different Cells dialog box, Please do as follows:

(1) Specify the first column whose values you will check if unique into the Find Values in box;
(2) Specify the second column you will check values based on into the According to box;
(3) In the Based on section, please check the Each row option;
(4) In the Find section, please check the Different Values option;
(5) It's optional to check the Fill backcolor option and specify a fill color from below drop down list;
(6) Click the Ok button.

Note: (1) If two columns have the same header, please check the My data has headers option; (2) For finding out duplicate values between two column, please check the Same Values option.

Kutools for Excel - Includes more than 300 handy tools for Excel. Full feature free trial 30-day, no credit card required! Get It Now

3. And then all unique values (or duplicate values) in the first column have been selected and filled with specified color, and a dialog box shows how many cells have been selected. See screenshot:

doc find unique values kte 02

If you want to select the values in column C but not in Column A, you just need to swap the scope of Range A and Range B.


In this Video, Kutools and Kutools Plus tabs are added by Kutools for Excel. If need it, please click for 30-day free trial without limitation!

Quickly find, select, and count all duplicate/unique values from a column in Excel

General, we can remove duplicates from a list easily with Data > Remove Duplicates in Excel. But how to select duplicate/unique values, or count them from a column? And what if selecting or counting duplicate/unique except the first duplicate one? Try Kutools for Excel’s Select Duplicate & Unique Cells utility! Full Feature Free Trial 30-day!

ad select duplicate unique values 2


Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    wani · 2 years ago
    '=IF(ISNA(VLOOKUP(A2,$C$2:$C$13,1,FALSE)),"Yes","")'formula worked thanks buddy......................
  • To post as a guest, your comment is unpublished.
    shankar · 2 years ago
    Student ID Pass/Fail Result
    2013000563 Passed
    2013000563 Failed
    2013000563 Passed
    2013000563 Passed
    2013000563 Passed Failed
    2013000595 Passed
    2013000595 Passed
    2013000595 Passed
    2013000595 Passed Passed
    please help me for same
  • To post as a guest, your comment is unpublished.
    Mort Wakeland · 2 years ago
    In your first example Col A has more rows than Col C. If your reverse that, where Col C has more rows than A, then when you run out of rows in Col A, there will be yes's in the test column. How do you account for unequal rows in the formula? thanks very much....
  • To post as a guest, your comment is unpublished.
    Ashwin · 3 years ago
    Hi Sir,

    I have columns with different numbers and i need the unique numbers in the seperate column using formula is that possible?

    Regards
    Ashwin
  • To post as a guest, your comment is unpublished.
    Raji · 4 years ago
    Thanks a lot for the detailed answer.
  • To post as a guest, your comment is unpublished.
    Fanny · 4 years ago
    I tried the two first ways but in both cases I got a message that the formula is faulty. Could the formula be different for excel on PC or mac? I would need an answer asap...
  • To post as a guest, your comment is unpublished.
    joyce · 5 years ago
    Hi there ,
    I want to reconcile the ledger account in order to trace discrepencies using the easiest excel function.

    please help
  • To post as a guest, your comment is unpublished.
    Fernando Madrid · 5 years ago
    I solved how we can find the differences between two spread sheets with nested formulas and an easy macro. I'm not a programmer. I'm an economist.

    Post this:

    http://youtu.be/T5H_w4x5tZg


    The template I designed is under copyright. Now I'm working with a different one when we are working with repeated records in both sheets.

    If anyone want to find any differences, send me your spread sheets if you like and I'll help you asap.
    • To post as a guest, your comment is unpublished.
      ramesh · 5 years ago
      dear sir
      plz help me to tally ledger a/c of two excel sheet