Lookup in One Column & Return Value of Another Column in Excel

In data analysis, we often need to find values of significant data points in a dataset. For example, in a business, you might have some product names and want to look up the stock level of that product. To do that, Microsoft Excel allows you to look up a value in a column and return the value of another column. In this article, we will learn the process using various formulas and functions.

Key Takeaways

Select the cell where you want to get the value.
Write this formula:
=VLOOKUP(“John Smith”,A2:E12,3,FALSE)
Replace “John Smith” with the value you are looking up, A2:E12 with the cell range, and 3 with the other column from where you want the value to return from.
Press Enter.

overview image

In this article, we will learn the explanation of this method and go through some more formulas so that you can choose the suitable one for your job. Therefore, keep reading to learn and apply them to your use case.

Download Practice Workbook
1

Using the VLOOKUP Function

In our example dataset, we have some records of employees including the departments they work in, how many days they were present or not, and what city they are from. An HR manager might want to know how many days a particular employee worked to issue their salary.

Looking Up Value in a Column and Returning Value of Another Column

However, when there are hundreds of employees in a company, it is not easy to find the record of a single employee. This article will teach you how to do that easily.

The VLOOKUP function is a well-known function in Microsoft Excel. It has been around a long time, and it gets the job done. Here is how to use it to look up a value in one column and return a value from another.

Steps:

Go to the cell where you want to see the value.
Write this formula:

=VLOOKUP(“John Smith”,A2:E12,3,FALSE)

Explanation
Here, the first parameter, “John Smith”, is the value we are looking for. Excel will search for this value in the leftmost column. The second parameter, A2:E12 is table range. In the table, we can see that the employee information is located from A2 to E12. The next value, 3, is the column index. We are trying to find the number of days that the employee was present, so it would be the third column. The final parameter represents whether excel should return a nearby value or look for an exact match. Entering FALSE will direct excel to return an exact match.

Press Enter after setting the parameters properly and excel will return the value.

Using the VLOOKUP Function


2

Using the XLOOKUP Function

Although the VLOOKUP function has been there for a while, Microsoft has introduced a new version of the function called XLOOKUP that is less confusing and works better. However, you will need at least Excel 2021 to use this function. Older versions of Office will not work, although you can open a file created using this function on Excel 2016/2019/365.

Steps:

Just like before, select the output cell for the value.
Enter this formula:

=XLOOKUP(“John Smith”, A2:A12, C2:C12)

Explanation
Again, “John Smith” is the value we are looking for here. A2:A12 is the range of data where the looked-up value belongs, which is the employee’s name here. C2:C12 is the data range from where excel should return the data from.

Using the XLOOKUP Function


3

Using INDEX-MATCH Formula

If those two functions didn’t meet your needs, and you want something out of the regular functions, this solution is for you. We are going to make the use of INDEX and MATCH functions together to do the job.

Steps:

Go to the output cell, and enter this formula:

=INDEX(A1:E12,MATCH(“John Smith”,A1:A12,0),3)

Explanation
The MATCH function returns the row where the looked-up value resides. It takes three parameters. First one is the value, which is “John Smith” here. Next one is the cells where it should look value for. The third one is whether the output should be the exact row or not. 0 represents the exact row here. However, we do not need to play with that parameter as it will only be useful for values with numbers. The INDEX function takes three parameters as well. First one is the table range, which is A1:E12 here. The second one is the row number, which will be returned by MATCH function. The last one is the column number, which is 3 here because we want the “Days Present” value.

Using INDEX-MATCH Formula


4

Using the LOOKUP Function

Finally, if you have a really old Microsoft Office version, you have no other choice but to use the LOOKUP function. It is very easy to use, but Microsoft does not recommend this function to be used in newer spreadsheets.

Steps:

This function works almost exactly like the newest XLOOKUP function. Use this formula:

=LOOKUP(“John Smith”,A2:A12,C2:C12)

Replace “John Smith” with your lookup value, A2:A12 to the range of the column where the data should be looked up from, and C2:C12 to the range where the value should be taken from to return.

Using the LOOKUP Function


Frequently Asked Questions

How to use VLOOKUP in Excel to return a value from another sheet?

Modify the formula like this
=VLOOKUP(“John Smith”, Sheet2$A2:E12,3,FALSE)
Here, Sheet2 is the other sheet where the data belongs.

Can VLOOKUP match 2 values?

No. However, you can create a separate column to create unique values, and then match values from that column.

Does VLOOKUP return yes or no?

No. However, you can combine the function with IF and ISNA functions to return yes or no. The formula should be written like this:
=IF(ISNA(VLOOKUP(“John Smith”, A2:E12,3,FALSE)), “No”, “Yes”)

What are the three types of lookup in Excel?

The three types of lookup are XLOOKUP, VLOOKUP, and HLOOKUP. XLOOKUP works for any type of lookup, while VLOOKUP and HLOOKUP work with vertical and horizontal lookup, respectively.

How to apply HLOOKUP in Excel?

Use the formula like this:
=HLOOKUP(“Employee”, A1:E12, 6, FALSE)
The lookup value must be in the first row.


Wrapping Up

By reading this article, you have learned four ways to look up a value in a column and return the value of another column in Excel. Use the practice file for exercising and mastering the formulas. Don’t forget to leave a comment if you found this article useful.

ExcelInsider Team
We will be happy to hear your thoughts

Leave a reply

Excel Insider
Logo