VLOOKUP across multiple sheets in Excel with examples
VLOOKUP across multiple sheets in Excel with examples
The tutorial shows how to use the VLOOKUP function to copy data from another worksheet or workbook,
Vlookup in multiple sheets, and look up dynamically to return values from different sheets into different
cells.
When looking up some information in Excel, it's a rare case when all the data is on the same sheet.
More often, you will have to search across multiple sheets or even di�erent workbooks. The good
news is that Microsoft Excel provides more than one way to do this, and the bad news is that all the
ways are a bit more complicated than a standard VLOOKUP formula. But with just a little patience, we
will �gure them out :)
Dynamic VLOOKUP to pull data from multiple sheets into di�erent cells
INDIRECT VLOOKUP
1 of 14 2/15/2025, 3:24 PM
Firefox https://www.ablebits.com/office-addins-blog/vlookup-multiple-sheets-e...
As an example, let's pull the sales �gures from Jan report to Summary sheet. For this, we de�ne the
following arguments:
Lookup_values are in column A on the Summary sheet, and we refer to the �rst data cell, which is A2.
Table_array is the range A2:B6 on the Jan sheet. To refer to it, pre�x the range reference with the
sheet name followed by the exclamation point: Jan!$A$2:$B$6.
Please pay attention that we lock the range with absolute cell references to prevent it from
changing when copying the formula to other cells.
Col_index_num is 2 because we want to copy a value from column B, which is the 2nd column in the
table array.
Drag the formula down the column and you will get this result:
In a similar manner, you can Vlookup data from the Feb and Mar sheets:
2 of 14 2/15/2025, 3:24 PM
Firefox https://www.ablebits.com/office-addins-blog/vlookup-multiple-sheets-e...
If the sheet name contains spaces or non-alphabetical characters, it must be enclosed in single
quotation marks, like 'Jan Sales'!$A$2:$B$6. For more info, please see How to reference another
sheet in Excel.
Instead of typing a sheet name directly in a formula, you can switch to the lookup worksheet and
select the range there. Excel will insert a reference with the correct syntax automatically, sparing
you the trouble to check the name and troubleshoot.
For example, to search for A2 value in the range A2:B6 on Jan sheet in the Sales_reports.xlsx workbook,
use this formula:
For full details, please see VLOOKUP from another workbook in Excel.
To see how this approach works on real-life data, let's consider the following example. Below is the
Summary table that we want to populate with the item names and amounts by looking up the order
number in West and East sheets:
3 of 14 2/15/2025, 3:24 PM
Firefox https://www.ablebits.com/office-addins-blog/vlookup-multiple-sheets-e...
First, we are going to pull the items. For this, we instruct the VLOOKUP formula to search for the order
number in A2 on the East sheet and return the value from column B (2nd column in table_array A2:C6).
If an exact match is not found, then search in the West sheet. If both Vlookups fail, return "Not found".
4 of 14 2/15/2025, 3:24 PM
Firefox https://www.ablebits.com/office-addins-blog/vlookup-multiple-sheets-e...
Tip. If needed, you can specify di�erent table arrays for di�erent VLOOKUP functions. In this
example, both lookup sheets have the same number of rows (A2:C6), but your worksheets may be
di�erent in size.
For the col_index_num argument, use the COLUMNS function that returns the number of columns in
a speci�ed array: COLUMNS($A$1:B$1). (The row coordinate does not really matter, it can be just any
row.)
In the lookup_value argument, lock the column reference with the $ sign ($A2), so it remains �xed
when copying the formula to other columns.
As the result, you get a kind of dynamic formula that extracts matching values from di�erent columns,
depending on which column the formula is copied to:
When copied to column C (i.e. you've dragged the formula from B2 to C2), B$1 changes to C$1
because the column reference is relative. Consequently, COLUMNS($A$1:C$1) evaluates to 3 forcing
VLOOKUP to return a value from the 3rd column.
5 of 14 2/15/2025, 3:24 PM
Firefox https://www.ablebits.com/office-addins-blog/vlookup-multiple-sheets-e...
This formula works great for 2 - 3 lookup sheets. If you have more, repetitive IFERRORs become too
cumbersome. The next example demonstrates a bit more complicated but a lot more elegant
approach.
Where:
Lookup_range - the column range in the lookup sheets where to search for the lookup value.
Col_index_num- the number of the column in the table array from which to return a value.
For the formula to work correctly, please bear in mind the following caveats:
It's an array formula, which must be completed by pressing Ctrl + Shift + Enter keys together.
6 of 14 2/15/2025, 3:24 PM
Firefox https://www.ablebits.com/office-addins-blog/vlookup-multiple-sheets-e...
As we use one table array for all lookup sheets, specify the largest range if your sheets have
di�erent numbers of rows.
1. Write down all the lookup sheet names somewhere in your workbook and name that range (
Lookup_sheets in our case).
2. Adjust the generic formula for your data. In this example, we'll be:
in the range A2:A6 (lookup_range) in four worksheets (East, North, South and West), and
pull matching values from column B, which is column 2 (col_index_num) in the data range A2:C6
(table_array).
Please notice that we lock both ranges ($A$2:$A$6 and $A$2:$C$6) with absolute cell references.
3. Enter the formula in the topmost cell (B2 in this example) and press Ctrl + Shift + Enter to
complete it.
4. Double click or drag the �ll handle to copy the formula down the column.
As the result, we've got the formula to look up the order number in 4 sheets and retrieve the
corresponding item. If a speci�c order number is not found, a #N/A error is displayed like in row 14:
7 of 14 2/15/2025, 3:24 PM
Firefox https://www.ablebits.com/office-addins-blog/vlookup-multiple-sheets-e...
To return the amount, simply replace 2 with 3 in the col_index_num argument as amounts are in the
3rd column of the table array:
If you'd like to replace the standard #N/A error notation with your own text, wrap the formula into the
IFNA function:
8 of 14 2/15/2025, 3:24 PM
Firefox https://www.ablebits.com/office-addins-blog/vlookup-multiple-sheets-e...
In this example, we wish to return the item names (column B) and amounts (column C), which are the
2nd and 3rd columns in the table array, respectively. So, the required array is {2,3}.
To correctly enter the formula in multiple cells, this is what you need to do:
In the �rst row, select all the cells to be populated (B2:C2 in our example).
Type the formula and press Ctrl + Shift + Enter . This enters the same formula in the selected cells,
which will return a di�erent value in each column.
9 of 14 2/15/2025, 3:24 PM
Firefox https://www.ablebits.com/office-addins-blog/vlookup-multiple-sheets-e...
Working from the inside out, here's what the formula does:
In more detail:
First, you concatenate the range name (Lookup_sheets) and the range reference ($A$2:$A$6), adding
apostrophes and the exclamation point in the right places to make an external reference, and feed the
resulting text string to the INDIRECT function to dynamically refer to the lookup sheets:
COUNTIF checks each cell in the range A2:A6 on each lookup sheet against the value in A2 on the
main sheet and returns the count of matches for each sheet. In our dataset, the order number in A2
10 of 14 2/15/2025, 3:24 PM
Firefox https://www.ablebits.com/office-addins-blog/vlookup-multiple-sheets-e...
(101) is found in the West sheet, which is 4th in the named range, so COUNTIF returns this array:
{0;0;0;1}
--({0; 0; 0; 1}>0)
This yields an array of TRUE (greater than 0) and FALSE (equal to 0) values, which you coerce to 1's and
0's by using a double unary (--), and get the following array as the result:
{0; 0; 0; 1}
This operation is an extra precaution to handle a situation when a lookup sheet contains several
occurrences of the lookup value, in which case COUNTIF would return a count greater than 1, while
we want only 1's and 0's in the �nal array (in a moment, you will understand why).
The MATCH function con�gured for exact match (0 in the last argument) looks for the value 1 in the
array {0;0;0;1} and returns its position, which is 4:
INDEX(Lookup_sheets, 4)
The INDEX function uses the number returned by MATCH as the row number argument (row_num),
and returns the 4th value in the named range Lookup_sheets, which is West.
INDIRECT("'"&"West"&"'!$A$2:$C$6")
11 of 14 2/15/2025, 3:24 PM
Firefox https://www.ablebits.com/office-addins-blog/vlookup-multiple-sheets-e...
And converts it into a reference that goes to the table_array argument of VLOOKUP:
Finally, this very standard VLOOKUP formula searches for the A2 value in the �rst column of the range
A2:C6 on the West sheet and returns a match from the 2nd column. That's it!
In case you have large chunks of data in the same format that are split over multiple spreadsheets,
you may want to extract information from di�erent sheets into di�erent cells. The image below
illustrates the concept:
Unlike the previous formulas that retrieved a value from a speci�c sheet based on a unique identi�er,
this time we are looking to extract values from several sheets at a time.
There are two di�erent solutions for this task. In both cases, you need to do a little preparatory work
and create named ranges for data cells in each lookup sheet. For this example, we de�ned the
following ranges:
12 of 14 2/15/2025, 3:24 PM
Firefox https://www.ablebits.com/office-addins-blog/vlookup-multiple-sheets-e...
If B1 is East, look in the range named East_Sales; if B1 is North, look in the range named North_Sales; if
B1 is South, look in the range named South_Sales; and if B1 is West, look in the range named West_Sales.
The range returned by IF goes to table_array of VLOOKUP, which pulls a matching value from the 2nd
column on the corresponding sheet.
The clever use of mixed references for the lookup value ($A2 - absolute column and relative row) and
the logical test of IF (B$1 - relative column and absolute row) allows copying the formula to other cells
without any changes - Excel adjusts the references automatically based on the relative position of a
row and column.
So, we enter the formula in B2, copy it right and down to as many columns and rows as needed, and
get the following result:
INDIRECT VLOOKUP
When working with many sheets, multiple nested levels could make the formula too lengthy and
di�cult to read. A far better way is to create a dynamic vlookup range with the help of INDIRECT:
13 of 14 2/15/2025, 3:24 PM
Firefox https://www.ablebits.com/office-addins-blog/vlookup-multiple-sheets-e...
Here, we concatenate the reference to the cell that contains a unique part of the named range (B1)
and the common part (_Sales). This produces a text string like "East_Sales", which INDIRECT converts
to the range name understandable by Excel.
As the result, you get a compact formula that works beautifully on any number of sheets:
That's how to Vlookup between sheets and �les in Excel. I thank you for reading and hope to see you
on our blog next week!
14 of 14 2/15/2025, 3:24 PM