What Is VLOOKUP in Excel
What Is VLOOKUP in Excel
The VLOOKUP function in Excel searches for a value in one column based on
a given value in another column. The formula is made of four parameters (or
arguments):
Lookup value: this is the value you want Excel to search for.
Table array: this is the cell range containing the lookup value and the value
you want Excel to return (the data you're looking for). Note: The lookup value
must be in the first column in the given range. For example, if your lookup
value is in cell A3, then your range should start with A.
Column index number: this is the column number in the given range
containing the value you want Excel to return. If your table array is A2:D10, for
example, count column A as your first column, column B as your second, and
so on. If your table array is C2:F10, count column C as your first column,
column D as your second, and so on. Your column index number tells Excel
which column to retrieve the data you're looking for.
Range lookup: this is an optional parameter. By default, the VLOOKUP
function always returns an approximate match (designated by TRUE). If you
want an exact match, enter FALSE.
You can use the same function in Google Sheets to quickly extract information from
complex datasets. Here's a step-by-step guide on how to use VLOOKUP in Google
Sheets.
How to use VLOOKUP in Excel
If you're looking for a quick refresher, here's the short version of how to use
the VLOOKUP formula in Excel. (Keep scrolling for a more detailed
breakdown.)
1. Click the cell where you want Excel to return the data you're looking for.
2. Enter =VLOOKUP(lookup value,table array,column index number,range lookup).
Now let's dive into a detailed breakdown of how to use VLOOKUP (or vertical
lookup).
To keep this tutorial simple, I'll show you how to use the VLOOKUP function in
Excel to identify an employee's ID based on their last name. Specifically,
we're looking for Sandra Kwon's employee ID. While you'd probably use
VLOOKUP for something more complex with a much larger dataset, the steps
to use VLOOKUP remain the same.
A quick reminder before we get started: the lookup value must be in the first
column of your table array. For this demo, our lookup value (Kwon in cell B6)
will be in the first column of our table array (B2:D10). If you're working with a
different dataset where the lookup value isn't in the first column, you may have
to reorganize your data. Or you can copy and paste the columns you're
working with into another area of your worksheet. If you go with the latter, I
recommend pasting the data into a new worksheet altogether to keep your
data manageable.
This is the modified VLOOKUP formula to return a value from another sheet
within the same workbook:
Let's use VLOOKUP to update the email address in cell E2 of Sheet 1 with the
email address in cell C2 of Sheet 2.
To quickly update the remaining email addresses in Sheet 1, drag the fill
handle from cell E2 down.
How to do VLOOKUP in Excel with two workbooks
To use VLOOKUP to retrieve data from another workbook, all you have to do
is include the file name of the other workbook within square brackets
immediately followed by the sheet name and table array. Here's the formula
template:
lookup)
=VLOOKUP(B2,[2023_employee_emails.xlsx]Sheet1!$A$2:$C$10,3,FALSE)