Skip to main content

Kutools for Office — One Suite. Five Tools. Get More Done.

How to compare two columns and return values from the third column in Excel?

Author Xiaoyang Last modified

For example, I have the following two columns, column A is some projects, and column B is the corresponding names. And here, I have some random projects in column D, now, I want to return the corresponding names from column B based on the projects in column D. How can you compare columns A and D and return the corresponding values from column B in Excel?


Compare two columns and return value from third column with VLOOKUP function

The VLOOKUP function can help you to compare two columns and extract the corresponding values from the third column, please do as follows:

1. Enter any of the below two formulas into a blank cell besides the compared column, E2 for this instance:

=VLOOKUP(D2,$A$2:$B$16,2,FALSE)
=IFERROR(VLOOKUP(D2,$A$2:$B$16,2,FALSE), "")
Note: In the above formulas: D2 is the criteria cell that you want to return the value based on, A2:A16 is the column including the criteria to be compared with, A2:B16 the data range that you want to use.

2. Then press "Enter" key to get the first corresponding value, and then select the formula cell and drag the fill handle down to the cells that you want to apply this formula, and all the corresponding values have been returned at once, see screenshot:

A screenshot showing results from comparing two columns and returning values using VLOOKUP in Excel


Compare two columns and return value from third column with INDEX and MATCH functions

In Excel, the INDEX and MATCH functions also can help you to solve this task, please do as follows:

1. Enter any of the below two formulas into a blank cell where you want to return the result:

=INDEX($B$2:$B$16, MATCH(D2,$A$2:$A$16,0))
=IFERROR(INDEX($B$2:$B$16, MATCH(D2,$A$2:$A$16,0)), "")
Note: In the above formulas: D2 is the value which you want to return its relative information, A2:A16 is the list that contains the value you want to return, B2:B16 is the column that you are looking for.

2. Then press "Enter" key to get the first corresponding value, and then select the formula cell and copy to the rest cells you need, and all the corresponding values have been returned, see screenshot:

A screenshot showing results from comparing two columns and returning values using INDEX and MATCH functions in Excel


If you often use the VLOOKUP function in Excel, Kutools for Excel's "Super LOOKUP" provides powerful VLOOKUP formulas, allowing you to perform lookups without needing to remember complex formulas.

A demonstration of Kutools for Excel's Super LOOKUP features

Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy permanently free AI features! Get It Now


Vlookup multiple columns and return the corresponding values with INDEX and MATCH functions

Sometimes, you may have a range of data which contains three columns, now you want to lookup on the table to match two criteria values, if both the two values matches, it will return the data from the third column C.

A screenshot of a dataset showing columns with multiple criteria for comparison in Excel

To dea with this job, please apply the following formula:

=INDEX($C$2:$C$16,MATCH(E2&F2, $A$2:$A$16&$B$2:$B$16,0))
Note: In the above formulas: E2, F2 are the criteria cells that you want to return the value based on, C2:C16 is the column that contains the values you want to return, A2:A16, B2:B16 are the columns you are looking for.

Then press "Ctrl" + "Shift" + "Enter" keys together to get the first result, see screenshot

A screenshot showing results after applying an array formula to compare two columns and return values in Excel

Copy and paste this array formula into other cells to get the complete results:

A screenshot showing the final results after copying the array formula to return multiple matching values in Excel


Using Kutools for Excel to compare two columns and return value form third column

Kutools for Excel’s "Look for a value in list" also can help you to return the corresponding data from another data range.

Kutools for Excel offers over 300 advanced features to streamline complex tasks, boosting creativity and efficiency. Itegarate with AI capabilities, Kutools automates tasks with precision, making data management effortless. Detailed information of Kutools for Excel...         Free trial...

1. Click a cell where you want to put the matched result.

2. Then click "Kutools" > "Formula Helper" > "Formula Helper", see screenshot:

A screenshot of Kutools for Excel's Formula Helper option in Excel

3. In the "Formulas Helper" dialog box, please do the following operations:

  • In the "Formula Type" drop down list, please select "Lookup" option;
  • Then, select "Look for a value in list" option in the "Choose a formula" list box;
  • And then, in the "Arguments input" text boxes, select the data range, criteria cell and column you want to return matched value from separately.

A screenshot of the Formula Helper dialog box for setting lookup arguments

4. Then click "Ok", and the first matched data based on a specific value has been returned. You just need to drag the fill handle to apply this formula to other cells you need,see screenshot:

A screenshot showing the results of using Kutools for Excel to compare two columns and return values

Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy permanently free AI features! Get It Now


More related VLOOKUP articles:

  • Vlookup And Concatenate Multiple Corresponding Values
  • As we all known, the Vlookup function in Excel can help us to lookup a value and return the corresponding data in another column, but in general, it can only get the first relative value if there are multiple matching data. In this article, I will talk about how to vlookup and concatenate multiple corresponding values in only one cell or a vertical list.
  • Vlookup And Return The Last Matching Value
  • If you have a list of items which are repeated many times, and now, you just want to know the last matching value with your specified data. For example, I have the following data range, there are duplicate product names in column A but different names in column C, and I want to return the last matching item Cheryl of the product Apple.
  • Vlookup Values Across Multiple Worksheets
  • In excel, we can easily apply the vlookup function to return the matching values in a single table of a worksheet. But, have you ever considered that how to vlookup value across multiple worksheet? Supposing I have the following three worksheets with range of data, and now, I want to get part of the corresponding values based on the criteria from these three worksheets.
  • Vlookup And Return Multiple Values Vertically
  • Normally, you can use the Vlookup function to get the first corresponding value, but, sometimes, you want to return all matching records based on a specific criterion. This article, I will talk about how to vlookup and return all matching values vertically, horizontally or into one single cell.

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions…
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


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!

All Kutools add-ins. One installer

Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.

Excel Word Outlook Tabs PowerPoint
  • All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
  • One installer, one license — set up in minutes (MSI-ready)
  • Works better together — streamlined productivity across Office apps
  • 30-day full-featured trial — no registration, no credit card
  • Best value — save vs buying individual add-in