Power Query Key Not Matching Error: Causes and Fixes

Errors & fixes · Updated November 20, 2026

The Power Query error “The key didn’t match any rows in the table” usually means a query is looking for a sheet, table, file, or other item that is no longer present under the name or type it expects. In Excel for Microsoft 365 on Windows, open the query’s Applied Steps, inspect the Navigation step, and point it to the correct item—or restore the missing item in the source.

What the key-matching error means

Power Query connects to a source, lists or reads its contents, and then selects a particular object to transform. A navigation step is the instruction that makes that selection. If the step asks for an object that cannot be found in the source’s current list, Power Query cannot continue and reports that the key did not match any rows.

Here, “key” does not mean a password, an Excel lookup key, or necessarily a unique ID in your data. It refers to the identifying values Power Query uses to locate a row in a table of available source objects. For an Excel workbook, those values may identify a worksheet or an Excel table by its name and kind. A query might, for example, expect a worksheet named Sales, but the source now contains a worksheet named Sales 2026.

The message often appears after a source workbook has been edited, moved, replaced, or reorganized. It can also appear when a query that worked on one file is refreshed against another file with a different layout. The transformations after the navigation step may be perfectly valid; the query simply cannot get to the expected object.

How Power Query navigation works

When Power Query connects to an Excel workbook, it can expose a list of workbook objects. Depending on the source, that list can include worksheets, named ranges, and Excel tables. The query selects an entry from the list and then works with the data in that entry. In the Power Query Editor, these actions commonly appear as Source and Navigation in the Applied Steps pane.

A typical navigation expression for a worksheet resembles Source{[Item="Sheet1",Kind="Sheet"]}[Data]. It asks Power Query to find the entry whose item is Sheet1 and whose kind is Sheet, then return that entry’s data. A table navigation step might instead identify an item with a kind of Table. These identifiers are not interchangeable: a worksheet and a table on that worksheet are separate objects.

That distinction explains a common surprise. Renaming an Excel table does not necessarily rename its worksheet, and renaming a worksheet does not rename a table on it. If the query selected the table, changing only the sheet name may not be the relevant fix. Check which object the query originally selected before changing anything.

Find the step that is failing

In Excel for Microsoft 365 on Windows, go to Data > Queries & Connections. In the pane, double-click the query to open Power Query Editor. Look at the Applied Steps list on the right. Select steps from top to bottom until the preview stops working; the first step that produces the error is usually the one to investigate. If the pane is not visible, use View > Query Settings in the editor.

  1. Select the Source step. Check whether it returns a list of objects or whether it already errors. If Source fails, the problem may be the connection, path, permissions, or source itself rather than navigation.
  2. Select Navigation. If Source displays a list of workbook objects but Navigation fails, compare the listed names and kinds with the item the query expects.
  3. Check the source file’s location and identity. A query may be opening a different workbook than you intended, especially if a file was copied, renamed, or replaced.
  4. Review later steps only after navigation works. Column names, data types, and filters can cause separate errors, but they cannot repair a missing navigation target.

Power Query may show a gear icon beside a step when that step has editable settings. If Navigation has one, use it to choose the correct object. If it does not, selecting the correct item from the Source preview may be easier than editing M code. The precise preview depends on the connector and source.

Common causes and how to tell them apart

  • A sheet was renamed or deleted. The query still requests the old worksheet name. Confirm the current tab name in the source workbook, including spaces and punctuation.
  • A table was renamed or converted to a range. A query targeting an Excel table may fail if that table no longer exists as a table. Click inside the source data and check whether Excel shows the Table Design tab; if not, the range may need to be formatted as a table again.
  • The query is using a different file. The replacement file may have the right filename but not the same sheets or tables. Verify the path and inspect the workbook that is actually being refreshed.
  • A folder contains inconsistent files. A folder-combine query often starts from a sample file and applies its navigation and transformation steps to other files. One file with a different worksheet or table structure can fail even when the sample file works.
  • The expected object type changed. The query may ask for a Table while the source now offers only a Sheet, or the reverse. Check both the item name and its kind.
  • The source is temporarily unavailable or changed shape. A cloud file may be inaccessible, a database view may have been removed, or a web source may return a different structure. Determine whether the issue affects one refresh or persists.

Names that look identical can also differ because of an extra space or a subtle punctuation change. Compare the actual object name rather than relying on memory. Avoid assuming that every error with the word “key” is a navigation error: a merge can use matching columns as keys, but a missing-row navigation message points first to the step selecting an object from the source.

Repair the navigation step safely

If the intended sheet or table still exists under a new name, update the navigation step to select that current object. In many queries, clicking Source and then selecting the correct object’s Data value creates a new Navigation step. Review the preview afterward, then check the remaining steps for errors. Some later steps depend on particular column names or types, so a successful selection does not guarantee that the entire query is repaired.

If the object was removed accidentally, restoring it with the expected name and type may be the simplest fix, particularly when many downstream steps rely on it. For example, if a query expects an Excel table named MonthlySales, restoring that table name may preserve more of the existing query than rebuilding its transformations. Do not create an empty object just to silence the error; it may refresh successfully while returning no useful data.

Advanced users can inspect the navigation expression through Home > Advanced Editor. If it refers to an obsolete item, update the item name or kind to match the actual source. Make a copy of the query or workbook before editing M code, and change only the relevant reference. A query can contain several navigation steps, especially when it connects through a folder or another query, so confirm which source each step refers to.

Example: a renamed worksheet

Suppose a query reads a worksheet called Orders from a workbook. The workbook owner renames that tab to Orders Archive. The Source step can still connect to the workbook and list its objects, but the Navigation step continues to look for an item named Orders with kind Sheet. Because that exact entry is gone, navigation fails.

There are two sensible remedies. If Orders Archive is now the intended data, change the query’s selection to that worksheet and confirm that the expected columns are still present. If the rename was accidental and other reports depend on the old name, rename the tab back to Orders instead. The better choice depends on whether the source structure or the query’s expected contract should remain stable.

Now consider a workbook that contains a worksheet named Orders and an Excel table named OrdersTable. Selecting the worksheet returns the sheet’s data; selecting the table returns the table’s data. If the query expects one but the source has changed the other, selecting a similarly named object may produce unexpected rows or headers. Verify the kind as well as the name.

When the problem involves a folder or changing files

Folder-combine queries are especially sensitive to inconsistent structure. Power Query typically uses a sample file to create transformation steps, then applies those steps to files found in the folder. If the sample contains a worksheet called Data but one incoming workbook calls it Export, the generated query may fail on that file. Differences in table names, header rows, or file formats can cause related failures.

Open the query that lists the folder contents and identify which file fails. Depending on how the combine process was created, inspect the sample-file query and the transformation function as well as the final combined query. Compare the failing workbook with a working one: object names, object kinds, headers, and whether the data is stored as a table are useful checks. Standardizing incoming files is often more reliable than adding special-case fixes for every variation.

If files are intentionally allowed to have different layouts, the query needs logic that accounts for those differences. That may mean selecting among known object names, filtering out irrelevant files, or handling missing columns during transformation. Such changes should be designed around the real source variations; a broad workaround that hides every error can also hide files that should have been corrected.

Prevent the error from returning

Power Query is more dependable when source structure is treated as part of the connection’s contract. Before changing a source workbook, check which sheets, tables, and column names existing queries use. When practical, load recurring source data into a named Excel table and keep its name and columns stable. Tables generally expand as rows are added, which is useful for refreshes, but renaming or deleting the table can still break a query that depends on it.

  • Document the expected workbook, worksheet or table name, and required columns.
  • Keep a consistent template for files placed in a folder-combine workflow.
  • Test a refresh after changing a source name, file path, or layout.
  • Keep a backup or versioned copy before making broad query or source changes.
  • Use clear, distinct names for tables and worksheets so it is obvious which object a query should use.

Changing a source’s layout does not automatically update every query that uses it. A workbook can open normally and still fail to refresh because the query is a separate set of instructions. Conversely, a successful refresh does not prove that it selected the intended object; check the output when a source has recently changed.

Frequently Asked Questions

Does this error mean my Excel lookup key is missing?
No, not usually. The wording refers to Power Query’s attempt to locate a row representing a source object, such as a worksheet or table. A missing match in a merge is a different issue, even though merges also compare key columns.

Why does Power Query work on one file but fail on another?
The files may not share the same structure. A folder query can expect a particular sheet or table in every file, while one workbook has a different name, object type, or layout. Compare the failing file with the sample file used by the combine process.

Should I delete the Navigation step?
Only if you understand what the query should select next. Removing it can help you return to the list of available source objects, but the query still needs a valid selection before later transformations can work. Selecting the correct object is usually safer than deleting steps at random.

Can I fix the error by refreshing again?
A refresh can help if the source was temporarily unavailable, but it will not correct a persistent mismatch such as a renamed or deleted table. If the same error returns, inspect Source and Navigation and verify the actual source file.

Will changing the sheet name fix every query that uses it?
It may fix queries that expect that sheet name, but other queries could depend on a different object or the new name. Check affected queries and refresh them after changing the source. A query that targets an Excel table may not depend on the worksheet name at all.

Are the steps different on Mac or Excel for the web?
Power Query capabilities and interface details vary by Excel version and platform. The instructions here describe Excel for Microsoft 365 on Windows; on Mac, available connectors and editing features can differ, and Excel for the web does not provide the same full Power Query editing experience. If a menu or editor feature is unavailable, use a supported Windows desktop version to inspect the query.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Errors & fixes

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.