You can bring data from another workbook into your current one by using the VLOOKUP function with the file path included in the table_array argument, or by opening both files at the same time and referencing the other tab by name. This technique allows you to merge lists, update pricing, or consolidate reports without copying and pasting data manually. First, ensure your source data is clean and that the lookup value (the item you are searching for) exists exactly the same way in both sheets, including matching text casing and spaces.

What You'll Need

  • A computer with Microsoft Excel installed (Windows or macOS).
  • Two separate Excel files or two different tabs within the same workbook containing your data.
  • Basic familiarity with Excel formulas and cell referencing.

Step-by-Step

  1. Open both workbooks. Launch Excel and open the workbook where you want the results (the destination workbook) and the workbook containing the original data (the source workbook). Both files must be open simultaneously for the reference to work.
  2. Identify the lookup value. In your destination sheet, click on the cell where you want the VLOOKUP result to appear. This cell should contain the value you want to find in the other sheet, such as a product name, ID number, or employee name.
  3. Start the formula. Type the equals sign (=) to begin your formula. Begin typing VLOOKUP. As you type, Excel will suggest the function in the formula bar; click on it.
  4. Enter the lookup value. Click on the cell containing the lookup value you identified in step 2. You can also type the value directly if it is static, but referencing the cell is more reliable. Close the parenthesis for this argument: (A2,.
  5. Select the table array. Switch to your source workbook. Click on the tab for the sheet containing the data you want to pull in. Click and drag to highlight the entire table of data you intend to use, including the column with the lookup value and the column with the result you want to display. Close the parenthesis for this argument: ,B2:E1000). This is the most critical part of the process.
  6. Specify the column index number. In the formula, type a comma (,) followed by the number of the column you want to return a value from. For example, if your highlighted range starts with the ID in column A and the price is in column C, you would enter ,3.
  7. Set the match type. Type a comma (,) followed by 0. This tells Excel to look for an exact match. Using 1 or -1 requires the data in the first column to be sorted alphabetically or numerically, which can lead to incorrect results if not perfectly ordered.
  8. Close the formula. Press Enter to finalize the formula.
  9. Copy the formula down. Click on the cell with your completed formula. Double-click the small square handle (fill handle) in the bottom-right corner of the cell to quickly copy the formula down to all rows in that column. Alternatively, drag the handle down to cover your desired range.

Common Mistakes

  • Incorrect Table Array Reference: The most frequent error is selecting the wrong range. If you forget to include the header row in your selection or if you select a range that doesn't include the column you want to retrieve, the result will be an error or incorrect data.
  • Wrong Column Index Number: Miscounting the columns is easy. If your lookup column is the first column (A) and your value is in the third column (C), the index number is 3, not 2. Remember that the first column is always number 1.
  • Using 1 instead of 0: Many users default to 1 because it is the default argument for match_type, but for VLOOKUP, 0 (false) is almost always required for an exact match. Using 1 can return incorrect results if the data isn't perfectly sorted.
  • Unmatched Data: If the lookup value in your destination sheet is "Product A" and the source sheet has "Product A ", with a trailing space, Excel will not find a match. Trim all data before using VLOOKUP.
  • Hidden Rows: VLOOKUP ignores hidden rows. If you hide a row in your source data that contains the lookup value, the function might still find it in a visible row. This is rarely a mistake but can be confusing if you expect results to disappear when you filter data.

Tips

  • Use Absolute Referencing: When your source data is in another workbook, it is good practice to lock the table array reference. Add dollar signs to the range, like $B$2:$E$1000. This prevents the range from shifting if you move the formula to a different row or column. The lookup value and index number should remain relative (no dollar signs) so you can copy the formula down.
  • Named Ranges: If you have complex ranges, you can name them. Go to the Formulas tab > Define Name. Name your source data range (e.g., "ProductList"). Then, in your VLOOKUP, you can type VLOOKUP(A2, ProductList, 3, 0). This makes the formula much easier to read and less prone to pointing to the wrong cells.
  • Check for Errors: If you see #N/A, it means Excel could not find the lookup value. If you see #REF!, it means your column index number is greater than the number of columns in your table array.
  • Text Formatting: Sometimes a number looks like a number in one sheet and as text in another. You can force a match by using the VALUE function if the lookup value is text, or TEXT if it is a number. For example, VLOOKUP(VALUE(A2), ...).

Troubleshooting

If your VLOOKUP returns an #N/A error, the first step is to check for hidden characters. Copy the lookup value from the destination sheet and paste it into a blank cell in the source sheet. If it fails to find a match there either, the data is not identical. Use the TRIM function on both the source and destination values to remove accidental spaces. If the data looks identical but still fails, check the cell formatting. If one cell is formatted as "Text" and the other is "General" or "Number", Excel may treat them as different values.

If you see #REF!, you likely have an index number that points to a column that doesn't exist in your selected range. For example, if your range only has 3 columns (A, B, C) but you asked for column 4, you will get this error. Revisit step 6 and recount your columns.

If the formula works on one computer but not another, the issue is likely file paths and network drives. If your source file is stored on a network drive (like a shared drive) and you move it to a local folder, the external reference to the file path will break. You will need to edit the formula and re-select the file path and range.

Frequently Asked Questions

Does VLOOKUP work across different files?

Yes, VLOOKUP works across different files, but the source file must be open in Excel at the time the formula is calculated. The formula must include the full file path, such as .

What do the dollar signs in a VLOOKUP formula mean?

The dollar signs ($) are used for absolute referencing. They lock a specific cell or range so that when you copy the formula to another cell, Excel does not change the reference. For example, $A$2 will always refer to cell A2, whereas A2 will change to B2, C3, etc., as you copy the formula down.

How do I handle errors like #N/A?

You can wrap your VLOOKUP in an IFERROR function to display a custom message instead of the error code. For example, =IFERROR(VLOOKUP(A2, Table1, 2, 0), "Not Found") will display "Not Found" if the value cannot be located in the table.

What is the difference between VLOOKUP and XLOOKUP?

XLOOKUP is a newer function in Excel that is often easier to use because it always returns an exact match by default and can look both to the left and right of the lookup column. VLOOKUP is limited to looking only to the right of the lookup column and requires you to specify the column index number.

Can I use VLOOKUP with partial text matches?

Standard VLOOKUP cannot use wildcards like * or ? for partial matching. For partial matches, you would typically use the INDEX and MATCH functions combined or XMATCH in newer Excel versions.

Why is my VLOOKUP case sensitive?

Standard VLOOKUP is not case sensitive; it treats "Apple" and "apple" as the same value. If you need a case-sensitive match, you must use a combination of INDEX, MATCH, and the EXACT function.