Match Two Lists With The MATCH Function (2024)

Watch our free training video on how to Match Two Lists With The MATCH Function in Excel

You can quickly compare two lists in Excel for matches using the MATCH function, IF function, or highlighting row difference.

Manually searching for the difference between two lists can both be time-consuming and prone to errors. You will end up wasting a lot of time!

There are various inbuilt functions and features in Excel that can do this task of Excel compare two lists easily. Let’s look for various options that you can follow:

Let’s look at each method one-by-one!

Don’t forget to download this Excel Workbook to follow along and compare two lists in Excel for matches:

download excel workbookMatch-Two-Lists.xlsx

Highlight Row Difference

You can easily highlight differences in value in each row using the conditional formatting feature in Excel. It will provide you with an idea of how many lines in the columns differ in values.

In the data below, you have two lists in Column A and Column B respectively.

Follow the steps below to highlight row difference:

STEP 1: Select both the columns.

STEP 2: Go to Home > Find & Select > Go To Special or simply press keys Ctrl + G and Select Special to open the Go To Special dialog box.

STEP 3: Select Row Difference and Click OK.

And, Voila!

See also Excel Date Magic: Calculate Six Months from Today in Seconds!

All the values in Stock List 2 that do not match with the corresponding value in Stock List 1 have been highlighted.

STEP 4: You can mark these cells with color as well. Go to Home > Font Color> Select Red.

This will permanently highlight the cells in red font colorfor future reference.

Compare Row using IF function

You can use the IF Function to compare two lists in Excel for matches in the same row. If Function will return the value TRUE if the values match and FALSE if they don’t.

You can even add custom text to display the word “Match” when a criterion is met and “Not a Match” when it’s not met.

Let’s see how we can compare two lists in Excel for matches using IF Function:

STEP 1: We need to enter the IF function in a blank cell.

=IF(

STEP 2: Enter the first argument for the IF function – Logical_Test

What is your condition?

The value in cell D12 is equal to the value in cell C12.

=IF(D12=C12,

STEP 3: Enter the second argument for the IF function – Value_if_true

What value should be displayed if the condition is true?

The text displayed should be Matchif D12 is equal to C12.

See also Excel INDIRECT Function Using Sheet References

=IF(D12=C12,“Match”,

STEP 4: Enter the third argument for the IF function – Value_if_false

What value should be displayed if the condition is false?

The text displayed should be Not a Matchif D12 is not equal to C12.

=IF(D12=C12,”Match”,“Not a Match”)

STEP 5: Apply the same formula to the rest of the cells by dragging the lower right corner downwards.

Compare List using Match Function

Before we understand how to compare two lists in Excel for matches, let’s first go through the basics of what the MATCH function Excel does.

What does it do?

It returns the position of an item in a range.

Formula breakdown:

=MATCH(lookup_value,lookup_array,[match_type])

What it means:

=MATCH(lookup this value,from this list or range of cells,return me the Exact Match).

I am sure that you have come across many occasions where you have two lists of data and want to know if a specific item in List1 exists in List2.

Well, I have!

With the MATCH function, you can verify if a cell´s item in List1 exists in List2.

The function will return the row position of that item in List2 hence confirming that it exists. If you get a #N/A it means that the cell´s item does not exist in List2.

You can then go ahead and filter your List1 with either the values returned or the #N/As.

See also INDEX-MATCH Maximum Sales

Here are our 2 Lists:

Match Two Lists With The MATCH Function (12)

Match Two Lists With The MATCH Function (13)

STEP 1: We need to enter the MATCH function in a blank cell:

=MATCH(

Match Two Lists With The MATCH Function (14)

STEP 2: Enter the first argument for the MATCH function –Lookup_value

What is the value you want to check?

Select the cell containing the List1 value, as this is what we want to check against List2.

=MATCH(C12,

Match Two Lists With The MATCH Function (15)

STEP 3: Enter the second argument for the MATCH function – Lookup_array

What is the list you want to check against?

Select the entire List2.

Match Two Lists With The MATCH Function (16)

And ensure to press F4 to make it an absolute reference.

=MATCH(C12, list2!$C$12:$C:21,

Match Two Lists With The MATCH Function (17)

STEP 4: Enter the third argument for the MATCH function –Match_type

How specific is your matching? We want an exact match so place in 0.

=MATCH(C12, list2!$C$12:$C:21, 0)

Match Two Lists With The MATCH Function (18)

STEP 5: Apply the same formula to the rest of the cells by dragging the lower right corner downwards.

Match Two Lists With The MATCH Function (19)

You now have all of the results!

You can see which row numbers the items exist in List2. For example, Mon45657 in List1 exists in List2 Row 9! If it does not exist in List2, then #N/A is displayed.

See also CONVERT Formula in Excel

Match Two Lists With The MATCH Function (20)

Using either of the three ways mentioned in this article, you can easily compare two lists in Excel for matches!

Further Learning:

  • Unlock the Power of the MATCH Function – Top 3 Examples
  • INDEX and MATCH Made Simple
  • Vlookup Approximate Match in Excel

Post Views: 81,606

John Michaloudis

Founder & Chief Inspirational Officer at MyExcelOnline.com

John Michaloudis is a former accountant and finance analyst at General Electric, a Microsoft MVP since 2020, an Amazon #1 bestselling author of 4 Microsoft Excel books and teacher of Microsoft Excel & Office over at his flagship Academy Online Course.

Match Two Lists With The MATCH Function (2024)
Top Articles
Latest Posts
Article information

Author: Velia Krajcik

Last Updated:

Views: 5913

Rating: 4.3 / 5 (74 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Velia Krajcik

Birthday: 1996-07-27

Address: 520 Balistreri Mount, South Armand, OR 60528

Phone: +466880739437

Job: Future Retail Associate

Hobby: Polo, Scouting, Worldbuilding, Cosplaying, Photography, Rowing, Nordic skating

Introduction: My name is Velia Krajcik, I am a handsome, clean, lucky, gleaming, magnificent, proud, glorious person who loves writing and wants to share my knowledge and understanding with you.