Get student or employee information with VLOOKUP
To get information listed in Excel about students or employees, you can take advantage of the VLOOKUP function to force it to perform an exact match.
How to retrieve information about students or employees with VLOOKUP?
To retrieve the information about the student with an ID of 23204 as shown in the screenshot above, the VLOOKUP function that was set to perform an exact match would help you. Note that to use the VLOOKUP function, you need to have the student ID, i.e., the lookup value, listed in the leftmost column of the table, while the other information you want to retrieve at the right side.
Generic syntax
=VLOOKUP(lookup_value,table_array,col_num,FALSE)
- lookup_value: The value to lookup. Here refers to the given student ID.
- table_array: The range of cells where to look for exact matches. Here refers to all the data including the student ID, first name, last name, and country information.
- col_num: The column you indicate in the table_array from which you want to retrieve the matched data.
- range_lookup FALSE: Forces VLOOKUP to only find the first exact match.
To retrieve the information about the student with an ID of 23204, please copy or enter the formulas below in the corresponding cells, and press Enter to get the results:
First name (Cell H5) =VLOOKUP(H4,B5:E9,2,FALSE)
Last name (Cell H6) =VLOOKUP(H4,B5:E9,3,FALSE)
Country (Cell H7) =VLOOKUP(H4,B5:E9,4,FALSE)
√ Note: Instead of typing the student ID 23204 in the formulas, we used the cell reference H4 since we want the formulas to be dynamic. In this way, we can easily get the information about other students by only changing the student ID in the cell H4.
Explanation of the formula
Here we use the formula below as an example:
=VLOOKUP(H4,B5:E9,3,FALSE)
- The range_lookup FALSE asks the VLOOKUP function to perform an exact match.
- The function then finds the match of 23204, the value in H4, in the cells through B5 to E9. So, it will aim at the 4th row in the range B5:E9.
- Then the VLOOKUP function will retrieve the value in the 3rd column of the row, which is Brown.
Related functions
The Excel VLOOKUP function searches for a value by matching on the first column of a table and returns the corresponding value from a certain column in the same row.
Related Formulas
Get information corresponding to maximum value
To retrieve data that are corresponding to the maximum value in a list, table or row in Excel, you can use an INDEX and MATCH formula together with the MAX function.
Get information corresponding to minimum value
To retrieve data that are corresponding to the minimum value in a table, you can use an INDEX and MATCH formula together with the MIN function.
Retrieve information associated with lowest n values
To retrieve data that are corresponding to the smallest, 2nd smallest, or nth smallest value in a list, table or row in Excel, you can use an INDEX and MATCH formula together with the SMALL function.
The Best Office Productivity Tools
Kutools for Excel - Helps You To Stand Out From Crowd
Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...
Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)
- One second to switch between dozens of open documents!
- Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
- Increases your productivity by 50% when viewing and editing multiple documents.
- Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Edge and Firefox.