How to compare two lists in Excel

In the tutorial, we will learn: How to compare two columns in Excel. We use various ways to compare two cells using functions in Excel. Some of these ways are:

  • Comparing two Columns row-by-row.
  • Comparing many columns for row matches or differences.
  • Highlight matches or differences between two columns.
  • Highlight row matches and differences.
  • Compare two lists and pull matching data.

Think sometimes we may want to match two columns in excel. Besides, we may want to pull out values for corresponding matching cells – from one table to another. In such cases, there is a combination of two functions that could help achieve the desired result.

Using INDEX and MATCH functions together makes this obtainable. Let us see what each function is and its syntax before we move to see the usage in an example.

INDEX and MATCH Functions:

  • The INDEX function returns a value in an array based on the row and column numbers we specify.
  • Syntax for the Index function is INDEX (array, row_number, [column_number])
  • The MATCH function searches for a lookup value in a range of cells. It then returns the relative position of that value in the range.
  • Syntax for the Match function is MATCH(lookup_value, lookup_array, [match type])

Note: There is also a function vLookup in Excel that does something similar. But using these formulae gives us more flexibility and control over what we want to do with our cells. Let’s use the Case Study below to show this.

we have a list of State Capitals

Step 1: Suppose we have a list of State Capitals like the ones given above along with the population of each.

Now, we want to find out the population of any particular state or a list of states from the above. We can do it using the INDEX and MATCH function.

We can do so using the INDEX and MATCH function by entering this in the Formula Bar

Step 2: Now, we wish to find out the population for GOA. We can do so using the INDEX and MATCH function by entering this in the Formula Bar:


Executing this command gives us the result in the cell G5. This is the correct population of Goa as per the table alongside.

There are some variations to the way the function can be used. Let us see another use of the same.

we do the following variation in the formula on the first cell where the population needs to be found

Variation in Step 2: Suppose, we want to find out the population for a table of States like shown above. Then we do the following variation in the formula on the first cell where the population needs to be found:


We then drag the formula across the table to get the result as above.

This formula checks the value for each entry in the array.

Knowing these functions helps in data analysis, where one has to compare data in each row.

TIP: Using $B2:$B11 in the formula instead of $B:$B makes the formula work faster. If you have a small table or one where you know the parameters of the array then give the complete table count. It will help in the calculation getting done much faster than if the full array is unspecified.

Related Tutorials

Delete Duplicate in Excel or Remove Duplicate in Excel
November 9, 2018
Excel Formulas PDF
September 6, 2018
How To Lock Cells in Excel | Unprotect Excel
August 13, 2018
4x Faster at Excel
August 6, 2018
Separate Content of One Excel Cells into Separate Columns
August 3, 2018
How to Transpose Excel Columns to Rows | Paste Special Method
July 26, 2018
How to create sparklines in Excel
July 19, 2018
AutoSum in Excel with Shortcut
July 17, 2018
OFFSET Function in Excel
July 6, 2018
Strikethrough Shortcut in Excel & Word
July 4, 2018
INDIRECT Function with SUM, MAX, MIN & Independent Cell Value
June 29, 2018
Pivot Table Slicers In Excel
June 12, 2018
How to Split Cells in Excel using Text to Column
June 7, 2018
How to Wrap Text in Excel Automatically and Manually
June 6, 2018
How to Hide/Unhide Column in Excel
June 5, 2018
Highlight row based on cell value
June 4, 2018
Learn how to remove blank cells in Excel
June 3, 2018
How to Group Numbers, Dates & Text in Pivot table in Excel
June 1, 2018
5 Powerful Tricks to Format cells in Excel
May 31, 2018
Insert a Picture into a Cell in Excel
May 25, 2018
What is ISFORMULA Function and FORMULATEXT Function
May 21, 2018
How to Use SUBSTITUTE Function
May 21, 2018
Excel Quartile Function in Excel
May 8, 2018
How to use the Excel PERCENTILE function
May 7, 2018
Insert or Type degree symbol in Excel with Autocorrect Feature
May 7, 2018
25% Discount
No prize
All Courses at $200
10% Discount
Free Ebook
No Prize
No luck today
50% Discount
No prize
80% Discount
Get a chance to boost your knowledge!
Use this coupon code for any course that you wish for. 
Our in-house rules:
  • You can choose any course & redeem coupon
  • If you find any difficulty, mail us on [email protected]
  • Wheel Spin will end soon
  • Coupon code can be applied within 2 days.