To pull data from another sheet or table in the same Excel workbook into Power Query, use Data > Get Data > From Other Sources > From Table/Range (or From Microsoft Query if you need to combine multiple tables), then point the query at the sheet or table you want. The key is that Power Query treats each sheet or table as a separate source, and you can load them all into one query for cleaning and combining. This guide walks through the exact steps, what to watch out for, and how to fix common errors.
What You'll Need
- Excel 2016 or later (Power Query is built in; in Excel 2010/2013 it's a free add-in from Microsoft).
- Your source data formatted as an Excel Table (select the range and press Ctrl+T) or at least a clean range with headers.
- Basic familiarity with the Power Query Editor ribbon.
Step-by-Step
- Format your source data as a table. Select any cell in the data, press Ctrl+T, confirm the range and that "My table has headers" is checked. Give the table a meaningful name in the Table Design tab (e.g., SalesData). This makes the query stable if rows are added later.
- Open Power Query. Go to the Data tab > Get Data > From Other Sources > From Table/Range. (In some versions it's simply From Table/Range on the Data tab.) If prompted, confirm the range or table name.
- Load the first table into Power Query Editor. The editor opens with a preview of your table. You can rename the query in the Query Settings pane (right side) to something like SalesQuery.
- Add a second table from the same workbook. In the Power Query Editor, go to Home > New Source > Excel (or From Table/Range again). Select the other sheet or table in the same workbook. This adds a new query.
- Combine the queries (optional). If you need to merge or append: select the first query, then Home > Combine > Merge Queries (or Append Queries). Choose the second query as the source, pick matching columns, and click OK. Expand the resulting column as needed.
- Clean and transform. Use the ribbon to remove columns, change data types, filter rows, etc. Each step is recorded in the Applied Steps pane.
- Load the result. When done, click Home > Close & Load > Close & Load To... and choose where to put the output (e.g., a new worksheet or the Data Model).
Common Mistakes
- Using a plain range instead of a table. If you select a range without converting to a table, Power Query may still work but the query won't automatically expand when you add rows. Always use Ctrl+T.
- Forgetting to refresh. After changing source data, right-click the output table and choose Refresh, or press Alt+F5. Power Query does not update automatically unless you set it to refresh on open (in Query Properties).
- Merging on the wrong column. When merging queries, ensure the key columns have the same data type. A common error is merging a text column with a number column, which returns no matches.
- Loading the same query twice. If you load a query to a worksheet and also to the Data Model, you may get duplicate data. Check the Queries & Connections pane to manage loads.
- Renaming a sheet or table after creating the query. This breaks the query because it references the old name. Either update the query source or avoid renaming.
Tips
- Use From Table/Range for each table you want to combine; it's more reliable than pointing to a whole sheet.
- Name your queries clearly in the Query Settings pane to keep track when you have many.
- If you need to combine many sheets with identical structure, consider Get Data > From File > From Workbook and select multiple sheets, then use Append.
- Set queries to refresh on file open: right-click the query in the Queries & Connections pane > Properties > check Refresh data when opening the file.
- Use the Advanced Editor to view or edit the M code if you need to adjust the source path manually.
Troubleshooting
If the query fails to load or shows errors, try these steps in order:
- Check the source table name. In the Power Query Editor, go to Home > Data Source Settings and verify the file path and table name. If the workbook was moved or renamed, update the path.
- Refresh the query. Click Refresh Preview in the editor or Refresh All on the Data tab. If it still fails, close and reopen the workbook.
- Look for data type mismatches. In the Applied Steps, check the "Changed Type" step. If a column has mixed types (e.g., text and numbers), Power Query may error. Use Transform > Data Type to set the correct type, or remove the step and reapply.
- Ensure no other process has the file locked. Close any other Excel windows or programs that might have the workbook open.
- If the query is slow, reduce the number of rows or columns loaded, or use Table.Buffer in the Advanced Editor to cache the source.
- If you see "Formula.Firewall" errors, go to Data Source Settings > Privacy Levels and set them to "None" for the workbook (only if you trust the source).
If none of that works, delete the query and recreate it from scratch, ensuring the source table is properly formatted.
Frequently Asked Questions
Can I use Power Query to get data from multiple sheets in the same workbook?
Yes. Use Data > Get Data > From Other Sources > From Table/Range for each sheet (after converting each to a table), then combine them with Append or Merge in the Power Query Editor.
Do I need to convert my data to a table first?
It's strongly recommended. Tables auto-expand when you add rows, so your query stays current. Ranges work but require manual range updates.
How do I refresh the query when the source data changes?
Right-click the output table and choose Refresh, or press Alt+F5. To refresh automatically on open, set the query properties to refresh when the file opens.
Can I load the query result to a new worksheet?
Yes. In the Power Query Editor, click Close & Load To... and choose New worksheet or Existing worksheet.
Why does my query show "DataSource.Error"?
This usually means the source table or sheet name changed, or the file path is wrong. Check Data Source Settings and update the path or table name.
Can I use Power Query to combine data from the same workbook but different sheets with different columns?
Yes, but you'll need to use Append as new and then handle missing columns (they'll appear as null). Alternatively, use Merge with a common key column.