How to Find Matching Values in Two Columns in Excel (2024)

Download Article

Compare data with just a few simple commands

Co-authored byLuigi Oppidoand Cory Stillman

Last Updated: July 29, 2024Fact Checked

Download Article

  • Using Conditional Formatting
  • |
  • Using VLOOKUP
  • |
  • Using a TRUE/FALSE formula
  • |
  • Video

Excel remains one of the most powerful tools in the Microsoft Office Suite, but it can be understandably daunting as well. Fortunately, we have broken down one of Excel's most essential features into just a few simple steps. This wikiHow article will teach you how to find matching values in two columns in Excel.

Finding Matching Values in 2 Excel Columns

  1. Select the columns you want to compare.
  2. Click "Conditional Formatting" in the "Home" tab.
  3. Select "Highlight Cells Rule" and "Duplicate Values."
  4. Browse your columns for highlighted values.

Method 1

Method 1 of 3:

Using Conditional Formatting

Download Article

  1. 1

    Select the columns you would like to compare. Using conditional formatting in Excel will allow you to automatically highlight any matching values across multiple columns. Click and drag your mouse over the columns you would like to compare.[1]

    • If the two columns are not side by side, simply hold down Ctrl and select whichever columns you need.
  2. 2

    Click Conditional Formatting from the "Home" tab. This will open up a drop-down menu with various additional options.[2]

    Advertisement

  3. 3

    Select Highlight Cells Rule and then Duplicate Values. This setting tells Excel that you want your conditional formatting to detect values that are duplicated (i.e., match) across your selected columns. [3]

  4. 4

    Click OK on the pop-up window. After selecting your conditional formatting settings, Excel will show you a pop-up window. Ensure the window reads Duplicate in the left-hand box, and click "OK."

    • The other box in the pop-up window allows you to change the colors Excel uses to indicate duplicates. The default is "Light Red Fill with Dark Red Text", but you may choose whichever you prefer.
  5. 5

    Identify the matching values. Excel will now highlight any duplicates with the formatting you chose in the previous pop-up box. Look for this colored formatting and identify any matches.

    • Using conditional formatting to find matching values is a handy way to find matches that may not be in the same row.
  6. Advertisement

Method 2

Method 2 of 3:

Using VLOOKUP

Download Article

  1. 1

    Create a third column next to your two columns of data. The VLOOKUP function involves using a specific formula to find matching values. You'll need a third column to input the formula and display any matches.

  2. 2

    Enter the VLOOKUP formula into the first row of the third column. Assuming your data begins from the top-left corner of your spreadsheet, the formula is as follows: =VLOOKUP(B1,$A$1:$A$17,1,FALSE).[4]

    • The "17" in the formula indicates 17 rows of data. Change the number to fit however many rows of data you have.
    • The "FALSE" value at the end of the formula is what tells Excel to look for an exact match in value. Replace it with "TRUE" to search for the nearest match that is less than or equal to the corresponding data point (represented in this case by B1). [5]
    • Just entering "=VLOOKUP" in Excel will pull up the full formula, which you can reference in populating each field with the necessary info.
  3. 3

    Copy the VLOOKUP formula all the way down. Drag down from the corner of the first box to your final row of data to copy the formula. Excel will automatically change the first value to the corresponding data point in that row.[6]

  4. 4

    Look for matching values in your third column. If there are any matching values, they will display as a number in your spreadsheet's third column. If there are no matching values, the VLOOKUP formula will simply turn up "#N/A".

  5. Advertisement

Method 3

Method 3 of 3:

Using a TRUE/FALSE formula

Download Article

  1. 1

    Create a third column next to your two columns of data. This method involves using a specific formula to find matching values. You'll need a third column to input the formula and display its results.

  2. 2

    Enter the TRUE/FALSE formula into the third column. Assuming your data begins from the top-left corner of your spreadsheet, the formula is as follows: =A1=B1.

  3. 3

    Copy the formula all the way down. Drag down from the corner of the first box to your final row of data to copy the formula. Excel will automatically change the values to the corresponding data points in that row.

  4. 4

    Look for a "TRUE" or "FALSE" assessment in the third column. Matching values will turn up a "TRUE" value. If there is no match, the box in the third column will read "FALSE."[7]

  5. Advertisement

Expert Q&A

Ask a Question

200 characters left

Include your email address to get a message when this question is answered.

Submit

      Advertisement

      Video

      Tips

      Submit a Tip

      All tip submissions are carefully reviewed before being published

      Submit

      Thanks for submitting a tip for review!

      About This Article

      How to Find Matching Values in Two Columns in Excel (19)

      Co-authored by:

      Luigi Oppido

      Computer & Tech Specialist

      This article was co-authored by Luigi Oppido and by wikiHow staff writer, Cory Stillman. Luigi Oppido is the Owner and Operator of Pleasure Point Computers in Santa Cruz, California. Luigi has over 25 years of experience in general computer repair, data recovery, virus removal, and upgrades. He is also the host of the Computer Man Show! broadcasted on KSQD covering central California for over two years. This article has been viewed 91,502 times.

      How helpful is this?

      Co-authors: 2

      Updated: July 29, 2024

      Views:91,502

      Categories: Microsoft Excel

      Article SummaryX

      1.Use conditional formatting to highlight matching values.
      2.Use VLOOKUP or a TRUE/FALSE formula to display matching values in a new column.

      Did this summary help you?

      In other languages

      • Print
      • Send fan mail to authors

      Thanks to all authors for creating a page that has been read 91,502 times.

      Is this article up to date?

      How to Find Matching Values in Two Columns in Excel (2024)

      FAQs

      How to find match values in two columns in Excel? ›

      You can compare two columns using the IF condition in Excel. The formula to compare two columns is =IF(B4=C4,”Yes”,” ”). It returns the result as Yes against the rows that contain matching values, and the remaining rows are left empty.

      Can I use VLOOKUP to compare two columns? ›

      Let's say you have two columns with some textual or numeric values and you need to identify which values are present in both columns and which aren't. The VLOOKUP function will help you complete this task.

      How do I find the match between two data sets in Excel? ›

      FAQs – How to Compare Two Lists of Data in Excel

      To compare two lists in Excel to find matches, you can use the VLOOKUP function. For example, if you have List A in Column A and List B in Column B, you can use the formula =VLOOKUP(A1, B:B, 1, FALSE) in Column C to check for matches.

      How to find common values between two columns in Excel? ›

      How to compare data in two columns to find duplicates in Excel
      1. Start Excel.
      2. In a new worksheet, enter the following data as an example (leave column B empty): A. ...
      3. Type the following formula in cell B1: =IF(ISERROR(MATCH(A1,$C$1:$C$5,0)),"",A1)
      4. Select cell B1 to B5.
      5. Select Fill in the Editing group, and then select Down.

      How do you compare two lists in Excel for matches? ›

      Use the formula “=IF(A1=B1, “Match”,”Not a match”)" to test if the cell in A1 is the same as B1, replacing the references to match your own data. Press the “Enter” key or select another cell to apply the formula. Identify whether your cell reads “Match” or “Not a match”, depending on the data in cells A1 and B1.

      How to sort two columns in Excel to match? ›

      Select Custom Sort. Select Add Level. For Column, select the column you want to Sort by from the drop-down, and then select the second column you Then by want to sort. For example, Sort by Department and Then by Status.

      What is the formula for match in Excel? ›

      The MATCH function searches for a specified item in a range of cells, and then returns the relative position of that item in the range. For example, if the range A1:A3 contains the values 5, 25, and 38, then the formula =MATCH(25,A1:A3,0) returns the number 2, because 25 is the second item in the range.

      How to do a VLOOKUP for 2 columns in Excel? ›

      Excel vlookup compare multiple columns
      1. VLOOKUP(A:A,C:C,1,FALSE) – the comparison of columns A (first column) and B (second column).
      2. E:E. – the range to look up (third column) against the matching values returned from the comparison of the first and second columns.
      3. – the column to return the matching values from.
      4. IFERROR.

      Can VLOOKUP match 2 values? ›

      You can't specify two lookup values in a VLOOKUP formula, so we'll need to use a workaround, which consists of two steps: Step1: Create a separate column where we will create unique lookup_values by merging our two lookup criteria – name and country – for example “MellaThailand“, “MellaNigeria“, etc.

      How to use VLOOKUP to find matches? ›

      In its simplest form, the VLOOKUP function says: =VLOOKUP(What you want to look up, where you want to look for it, the column number in the range containing the value to return, return an Approximate or Exact match – indicated as 1/TRUE, or 0/FALSE).

      How to match values in two columns in Excel? ›

      In Excel, you can compare two columns using the IF condition. The formula to compare two columns is =IF(A2=B2,”Match”,” ”). It returns the result as Match against the rows that contain matching values, and the remaining rows are left empty.

      How to find matching cells in two Excel sheets? ›

      You just need to select a column where you want to put the matching data and enter the following formula: =MATCH(B2,Sheet1! B2:B6,0). This formula will return the row number of the matching value in Sheet1, or an error if there is no match.

      How do you use the two match function in Excel? ›

      Step-by-step instructions:

      Initiate the MATCH function in the column number input. Input both the year lookup value (M3) and the month lookup value (M4) within the same lookup input slot and use the ampersand (&) sign to separate the values.

      How do I randomly match two columns in Excel? ›

      How to randomly select in Excel without duplicates
      1. Enter the Rand formula in B2, and copy it down the column: =RAND()
      2. Put the below formula in C2 to extract a random value from column A: =INDEX($A$2:$A$16, RANK(B2,$B$2:$B$16), 1)
      3. Copy the above formula to as many cells as many random values you want to pick.
      Mar 17, 2023

      How to compare two sheets in Excel for matches and differences? ›

      Compare two or more worksheets at the same time
      1. On the View tab, in the Window group, click New Window.
      2. On the View tab, in the Window group, click View Side by Side .
      3. In each workbook window, click the sheet that you want to compare.
      4. To scroll both worksheets at the same time, click Synchronous Scrolling.

      References

      Top Articles
      Latest Posts
      Recommended Articles
      Article information

      Author: Dan Stracke

      Last Updated:

      Views: 6428

      Rating: 4.2 / 5 (63 voted)

      Reviews: 94% of readers found this page helpful

      Author information

      Name: Dan Stracke

      Birthday: 1992-08-25

      Address: 2253 Brown Springs, East Alla, OH 38634-0309

      Phone: +398735162064

      Job: Investor Government Associate

      Hobby: Shopping, LARPing, Scrapbooking, Surfing, Slacklining, Dance, Glassblowing

      Introduction: My name is Dan Stracke, I am a homely, gleaming, glamorous, inquisitive, homely, gorgeous, light person who loves writing and wants to share my knowledge and understanding with you.