How to use the Lookup Function to Compare Two Columns In Excel

The LOOKUP function is used to search for a particular value in a particular row or column and return the result from another row or column. Excel has various lookups such as VLOOKUP (V stands for vertical), HLOOKUP (H stands for horizontal), and XLOOKUP (combination of both VLOOKUP and HLOOKUP).

Let’s see the below example to compare two columns using VLOOKUP.

Where Column A consists of a list of exams given by a student and Column B is a list of

subjects that students passed. The result sheet should contain a list of all the subjects. The VLOOKUP() is applied in cell C2 as =VLOOKUP(A2, $B$2:$B$4,1,0).

Drag the formula to apply it in the cell below C2. You will find the result in column C with the subjects that are cleared and those that have not been passed as N/A.

How to Compare Two Columns in Excel : Easy and Quick Methods

Excel provides various functions and methods by which we can compare two columns and identify matching and mismatching data. Working with a very large Excel dataset, comparing two different columns, and recording the result as Matched or Not Matched can be very time-consuming. It is simple to compare columns in small tables but it becomes complicated when you need to compare two columns in a large spreadsheet. Comparing the columns manually is a time-consuming approach that can be avoided with the application of some fundamental knowledge of Excel.

Similar Reads

Why Compare Two Columns in Excel

Excel is a versatile tool that stores data and manipulates data for better decision-making. We are required to compare Excel columns data for the following reasons:...

How to Compare Two Columns in Excel

There are many different ways to compare your data when it is present in two different columns, tables, or spreadsheets to make sure that there shouldn’t be any missing or duplicate data present in the columns....

Compare Two Columns in Excel using Conditional Formatting

In this method, we will the Conditional Formatting rules provided by Excel to compare the two columns and highlight the DUPLICATE DATA between the two columns....

Highlight Unique Data

In this method, we will use the Conditional Formatting rules provided by Excel to compare the two columns and highlight the UNIQUE DATA between the two columns....

Compare Two Columns in Excel Using Equals Operator

In this method, we will create one more column in our existing dataset as Result which will be used for storing the matched and unmatched responses....

Compare Two Columns in Excel Using the IF Condition

You can also use the IF condition to compare two columns in Excel. The Formula that can be used is =IF(A2=B2,”MATCH”,” “). It will return the result as MATCH against the rows that contain, matching values, and the remaining rows will show Not Match....

Using the Lookup Function to Compare Two Columns

The LOOKUP function is used to search for a particular value in a particular row or column and return the result from another row or column. Excel has various lookups such as VLOOKUP (V stands for vertical), HLOOKUP (H stands for horizontal), and XLOOKUP (combination of both VLOOKUP and HLOOKUP)....

FAQs on Comparing Two Columns in Excel

How to compare two Columns in Excel easily? Follow the below steps to compare two columns: Step 1: Select both columns of data. Step 2: Go to Home. Step 3: Then click on Find & Select. Step 4: Now Go To Special > Select row Differences. Step 5: Click OK....

Contact Us