How to compare two columns and return values from the third column in Excel?
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 could you compare the two columns A and D and return the relative values from column B in Excel?
Compare two columns and return value form third column with formulas
Compare two columns and return value form third column Kutools for Excel
Vlookup and return matching values from the third column:
Kutools for Excel collects multiple useful formulas for Excel Users, by using them you can quickly solve many difficult problems, such as calculate ages, add months, years, days, weeks, vlookup and return values from third column and so on. Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days. Download and free trial Now! |
Compare two columns and return value form third column with formulas
The following formulas 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:
=IF(ISNA(MATCH(D2,$A$2:$A$16,0)),"",VLOOKUP(D2,$A$2:$B$16,2,FALSE))
=VLOOKUP(D2,$A$2:$B$16,2,FALSE)
2. Then press Enter key to get the first corresponding value, see screenshot:
3. And then select the 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:
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.
Compare two columns and return value form third column Kutools for Excel
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 : with more than 300 handy Excel add-ins, free to try with no limitation in 60 days. |
After installing Kutools for Excel, please do as follows:
1. Click a blank cell where you want to return the relative data.
2. Then click Kutools > Formulas > Look for a value in list, see screenshot:
3. In the Formula Helper dialog box, do the following operations:
(1.) Click button beside the Table_array to select the data range that you want to look from, and enter the $ character to the cell reference to make the relative reference to absolute reference;
(2.) Click button beside the Look_value to select the criteria value you need;
(3.) Click button beside the Column to select the column will be returned the corresponding values from.
4. Then click Ok button to close the dialog, and the first corresponding data has been displayed, see screenshot:
5. Then select the first matching cell and drag the fill handle down to the cells that you want to apply this formula, and all the relative values have been returned at once, see screenshot:
Download and free trial Kutools for Excel Now !
Demo: Compare two columns and return value form third column Kutools for Excel
Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days. Download and free trial Now!
The Best Office Productivity Tools
Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
- Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
- Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
- Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
- Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
- Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
- Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
- Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
- Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
- More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
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!