Quick, clean, and to the point

VLOOKUP from another workbook

Excel formula: VLOOKUP from another workbook
Generic formula 

To lookup and retrieve information stored in a separate (external) workbook, you can use the VLOOKUP function with a full reference to the other workbook. In the example shown, the formula in C5 is:

=VLOOKUP(B5,'[product data.xlsx]Sheet1'!$B$5:$E$13,4,0)

The single quotes (') in the formula above are necessary because "product data.xlsx" contains a space character.


In this example, the goal is to use VLOOKUP to find and retrieve price information for a given product stored in an external Excel workbook. The workbook exists in the same directory and the data in the file looks like this:

Sample product data in an external workbook

Note the data itself is in the range B5:E13.

VLOOKUP formula

The formula used to solve the problem in C5, copied down, is:

=VLOOKUP(B5,'[product data.xlsx]Sheet1'!$B$5:$E$13,4,0)

This is a standard use of the VLOOKUP function to retrieve data from the 4th column in a table:

  • lookup_value comes from B5
  • table_array is a reference to a range in an external workbook
  • col_index is 4, to retrieve data from column 4
  • range_lookup is zero to force an exact match

The only difference is the special syntax used for external references, in the "able_array"argument. The syntax for external references is:

  • workbook is the name of the external workbook (product data.xlsx)
  • sheet is the name of the sheet containing the range (Sheet1)
  • range is the actual range for table array ($B$5:$E$13)

Note the workbook and sheet part of the reference are enclosed in single quotes (') because the file name "product data.xlsx" contains a space character. Also note the range is entered as an absolute reference. This allows the formula to be copied down the column without the range changing.

Entering the reference

The easiest way to enter a reference to an external range is to use the "point and click" method. Begin entering the VLOOKUP function normally. Then, when entering the table_array argument, browse to the the external workbook and select the range directly in the other file. Excel will construct the needed reference automatically.

Note the reference will change depending on whether the external file is open or not. If the external workbook is open, VLOOKUP will show the workbook name and address for the table_array argument, as in the the screenshot above. If the external file is not open, VLOOKUP will display the full file path to the workbook + workbook name and address.

Handling spaces and punctuation

Note the reference to workbook is enclosed in square brackets, and the entire workbook + sheet is enclosed in single quotes. The single quotes (') are required when the workbook or sheet name contains space or punctuation characters

Dave Bruns

Excel Formula Training

Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.

Download 100+ Important Excel Functions

Get over 100 Excel Functions you should know in one handy PDF.