Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Pulling Data from Different Sheets in Excel: A Guide

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To pull data from different sheets in Excel, you can use a simple cell reference (e.g., =Sheet2!A1), the VLOOKUP or XLOOKUP functions for searching specific values, or Power Query for merging entire tables. These methods allow you to consolidate information into a single master sheet without manually copying and pasting data, ensuring your summary remains updated as the source data changes.

What You'll Need

  • Microsoft Excel installed on your computer.
  • A workbook containing at least two different worksheets (tabs) with the data you wish to pull.
  • Consistent data formatting (e.g., if you are using a lookup function, the unique identifier must be in the same format across all sheets).

Step-by-Step

Depending on your goal, choose one of the following three methods. Note that menu labels may differ slightly depending on your version of Excel or region.

Method 1: Simple Cell Referencing (Linking)

Use this method when you want a specific cell in your master sheet to always show the value of a specific cell in another sheet.

  1. Open your Excel workbook and click on the cell where you want the data to appear.
  2. Type the equals sign (=).
  3. Click on the tab of the sheet containing the source data.
  4. Click on the specific cell you want to pull.
  5. Press Enter. Excel will automatically create a formula like =Sheet2!B5.

Method 2: Using XLOOKUP or VLOOKUP (Searching)

Use this method when you have a unique ID (like an Employee ID or Product SKU) and want to pull corresponding information from another sheet.

  1. Click the cell where you want the result to appear.
  2. Type =XLOOKUP( (or =VLOOKUP( if using an older version of Excel).
  3. Click the cell in your current sheet that contains the value you are searching for (the lookup value).
  4. Type a comma.
  5. Navigate to the source sheet and highlight the column containing the lookup values.
  6. Type another comma.
  7. Highlight the column containing the data you actually want to pull.
  8. Close the parenthesis ) and press Enter.

Method 3: Power Query (Consolidating Large Tables)

Use this method to merge multiple sheets with the same column structure into one giant master list.

  1. Ensure your data on each sheet is formatted as a Table (Select the data and press Ctrl + T).
  2. Go to the Data tab on the top ribbon.
  3. Select Get Data > From Other Sources > Blank Query.
  4. In the formula bar at the top, type = Excel.CurrentWorkbook() and press Enter.
  5. You will see a list of all tables in your workbook. Click the small "expand" icon (two arrows pointing opposite ways) in the header of the "Content" column.
  6. Uncheck "Use original column name as prefix" and click OK.
  7. Click Close & Load in the top left corner to bring the consolidated data into a new sheet.

Common Mistakes

  • Renaming Sheets: If you use a simple reference and then rename the source sheet, Excel usually updates the formula automatically. However, if you delete the sheet, you will get a #REF! error.
  • Mismatched Data Types: Trying to pull data using a lookup function where one sheet stores the ID as "Text" and the other stores it as a "Number" will result in a #N/A error.
  • Absolute vs. Relative References: When dragging a simple reference formula down a column, Excel changes the cell reference. Use dollar signs (e.g., =Sheet2!$A$1) to lock the reference to one specific cell.
  • Hidden Rows: Power Query pulls all data in a table, including rows you may have hidden using a filter.

Tips

  • Naming Ranges: Instead of referencing Sheet2!A1:B10, highlight that area and give it a name in the Name Box (top left). You can then use =SUM(SalesData), which is much easier to read.
  • 3D Sums: If you have 12 sheets (one for each month) with the exact same layout, you can sum them all at once using a 3D reference: =SUM('January:December'!B5).
  • Table Formatting: Always convert your data ranges to Tables (Ctrl + T). This ensures that if you add new rows to your source sheets, your Power Query or lookup formulas will include the new data automatically.

Troubleshooting

If your data is not pulling correctly, try these steps in order:

  1. Check for #N/A: This usually means the lookup value does not exist in the source sheet. Check for leading or trailing spaces in your cells.
  2. Check for #REF!: This happens if a sheet or cell referenced in your formula was deleted. You will need to rewrite the formula.
  3. Refresh Power Query: If you changed data in the source sheets but the master sheet hasn't updated, right-click the Power Query table and select Refresh.
  4. Verify Sheet Names: If you are typing formulas manually, remember that if a sheet name has a space (e.g., Sales Data), it must be enclosed in single quotes: ='Sales Data'!A1.

Frequently Asked Questions

Can I pull data from a completely different Excel file?

Yes. While the workbook is open, you can use the same cell reference method. Excel will include the file name in the formula. If the file is closed, the formula will show the full file path on your hard drive.

What is the difference between VLOOKUP and XLOOKUP?

XLOOKUP is a newer, more flexible function. Unlike VLOOKUP, it can look for data to the left of the lookup column and does not require you to count the column index number manually.

How do I pull data from multiple sheets based on a condition?

The best way to do this is using Power Query. You can filter the "Name" column in the Power Query editor to only include sheets that meet certain criteria before expanding the data.

Why is my formula showing as text instead of the result?

This usually happens if the cell is formatted as "Text" instead of "General." Change the cell format to General and then double-click the cell and press Enter to trigger the formula.

Can I pull data from sheets automatically when I add a new sheet?

Using the =Excel.CurrentWorkbook() method in Power Query is the most efficient way to do this. Whenever you add a new table to the workbook, simply hitting "Refresh" on your master table will pull in the new data.