Smart Systems for Home

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

Get Named Range in Power Query: Step-by-Step Guide

· 6 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 get a named range in Power Query, you cannot reference the range name directly in the Power Query Editor. Instead, you first load the named range into Excel as a table (or use the Name Manager to confirm its address), then connect Power Query to that table. The quickest method: select any cell inside the named range, go to Formulas > Name Manager, note the range address, then use Data > From Table/Range after converting the range to a table. Power Query reads tables, not Excel range names.

What You'll Need

  • Excel with Power Query (built into Excel 2016 and later; for Excel 2010/2013 it is a free add-in from Microsoft).
  • A workbook that already contains at least one named range (created via Formulas > Define Name or Name Manager).
  • Basic familiarity with the Excel ribbon and the Power Query Editor window.

Step-by-Step

  1. Locate the named range. Open your workbook and go to Formulas > Name Manager. In the list, find the name you want. The “Refers To” column shows the actual cell address (for example, Sheet1!$A$1:$D$20). Write down the sheet name and address. Menu labels can differ slightly by Excel version and region.
  2. Decide whether the range is a single block. Power Query works best with a rectangular block of cells that has a header row. If your named range spans multiple non-contiguous areas or includes blank rows, clean it up first or plan to filter in Power Query.
  3. Convert the range to an Excel table. Select any cell inside the named range, then press Ctrl+T (or go to Insert > Table). In the Create Table dialog, confirm “My table has headers” if the first row contains column names, then click OK. This creates a structured table; Power Query can connect to it directly.
  4. Give the table a clear name. With the table selected, go to Table Design (called Table Tools > Design in some versions) and change the Table Name box to something meaningful, such as tblSales. Avoid spaces and special characters.
  5. Load the table into Power Query. Click any cell in the table, then go to Data > From Table/Range. If prompted, confirm the range and that headers are included. The Power Query Editor opens with your data previewed.
  6. Apply any transformations. Use the ribbon to remove columns, change data types, filter rows, or rename columns. Each action is recorded as a step in the Applied Steps pane on the right.
  7. Close and load. Click Home > Close & Load (or Close & Load To… to choose a worksheet or the Data Model). The transformed data appears as a new table or connection in your workbook.
  8. Refresh when the named range changes. Because Power Query is connected to the table, any edits inside the table’s boundaries are picked up on refresh. Right-click the output table and choose Refresh, or use Data > Refresh All. If the named range grows beyond the original table size, you must resize the table first (drag the resize handle) so Power Query sees the new rows.

Common Mistakes

  • Trying to type the range name into a Power Query formula. Power Query has no direct function to read an Excel defined name. It reads tables, connections, files, and folders.
  • Forgetting to convert the range to a table. “From Table/Range” on a plain range creates a table automatically, but if the range is not rectangular or has merged cells, the conversion fails or produces errors.
  • Assuming refresh picks up new rows outside the table. A table only covers its current boundaries. If rows are added below the table, they are ignored until you resize the table.
  • Using a name that conflicts with a cell reference. Excel will not allow a defined name like “A1” or “R1C1”. If Name Manager shows an error, rename the range.
  • Leaving blank header cells. Power Query will assign generic names like Column1, Column2, which makes later steps confusing.

Tips

  • Keep the source table on its own sheet or in a clearly labelled area so refreshes do not collide with other data.
  • Use Data > Queries & Connections to see all queries and their refresh status in one pane.
  • If you need to combine several named ranges, load each as a separate table and use Home > Append Queries in Power Query.
  • For ranges that change size frequently, consider converting the source to an Excel Table (Ctrl+T) and using a dynamic named range is not necessary; tables auto-expand when you type in the row directly below.
  • Name your query steps clearly in the Applied Steps pane so you can audit or undo transformations later.

Troubleshooting

If the named range does not appear in Power Query, first confirm it exists in Formulas > Name Manager and that it refers to a valid worksheet range. If “From Table/Range” is greyed out, click a single cell inside a contiguous data block; the command needs an active cell within data. If the query loads but shows wrong columns, check that the header row was included during table creation and that no merged cells sit in the header. If refresh fails with a “table not found” error, the table may have been renamed or deleted; update the query source via Home > Data Source Settings or recreate the table with the same name. If numbers appear as text, use Transform > Data Type to change the column type. For very large ranges, loading to the Data Model instead of a worksheet can improve performance.

Frequently Asked Questions

Can Power Query read an Excel named range directly by its name?

No. Power Query connects to tables, ranges, files, and external data sources, but it has no built-in function that resolves an Excel defined name. You must convert the named range to a table or point Power Query at the sheet and cell address.

Do I lose the named range if I convert it to a table?

No. The defined name remains in Name Manager and still refers to the same cells. The table is an additional structure layered on top. You can keep both, though refreshing Power Query depends on the table boundaries, not the name.

What happens if the named range expands after I load it?

Power Query will not see new rows outside the table’s current size. Resize the table by dragging its bottom-right handle, then refresh the query. If the range is a plain range rather than a table, Power Query may not pick up changes reliably.

Can I use a named range from another workbook?

Only indirectly. Open the other workbook, convert its named range to a table, and either load that table into Power Query from within that workbook or use Data > Get Data > From File > From Workbook and navigate to the table. The defined name itself is not exposed to Power Query.

Why does my query show old data after I edit the named range?

Power Query caches results until you refresh. Right-click the output table and choose Refresh, or press Data > Refresh All. If the edits fall outside the table boundaries, resize the table first.

Is there a way to avoid converting the range to a table?

You can use Data > Get Data > From Other Sources > From Microsoft Query or point to the sheet by name, but these methods are less reliable and do not track range size changes. Converting to a table is the supported, stable approach.