Merge Queries Power Query

If you just need to merge queries power query and move on, the boxed answer at the top is all you need. The rest of this page is for when you want to understand why it works in Excel, adapt it to a trickier version, or make it robust enough to hand to a colleague. We keep the opening short on purpose — the depth is here when you want it, not in your way when you don’t.

Exact answer

In Excel: start from Data ▸ Get Data (or Data ▸ From Table/Range) to open the Power Query Editor, shape the data with the ribbon buttons, then Close & Load to drop the result on a sheet.

Annotated stepsExcel
1

Data ▸ Get Data and choose the source, or Data ▸ From Table/Range for data already on a sheet.

2

In the editor, shape the data with the ribbon: Remove Columns, Split Column, Filter, Change Type, Unpivot.

3

Watch the Applied Steps pane on the right — it is the recipe, and any step can be deleted or reordered.

4

Set every column's data type explicitly before loading; it is the step most often skipped.

5

Close & Load, or Close & Load To… if you want a connection only, or a load straight into the Data Model.

6

Afterwards, Data ▸ Refresh All replays every step against the current source.

Ctrl+CthenCtrl+Shift+V+Cthen+Ctrl+VPaste values · WindowsMac

What this does

Power Query — shown in the ribbon as Get & Transform — is the import-and-clean layer that sits in front of the worksheet. Its defining property is that it RECORDS every step rather than performing it: removing a column, splitting one, changing a type, filtering rows and unpivoting all land as an ordered list in the Applied Steps pane. Point it at next month's file and click Refresh, and the whole sequence replays. That makes it the correct answer to any cleaning job you will do more than once, and to combining a folder of identically shaped files (Get Data ▸ From File ▸ From Folder). Two operations have no practical worksheet equivalent: Unpivot Columns, which turns a wide twelve-month-columns layout into the tall three-column shape every PivotTable wants, and Merge Queries, a join that handles many-to-many where VLOOKUP cannot. It is built into Excel for Windows from 2016 and into Excel for Mac from 2019, though the Mac version supports fewer connectors. The same idea underpins a lot of everyday Excel work, so the few minutes spent getting it right here pay back across every sheet you build afterwards. Treat it as a pattern, not a one-off, and it stops being something you look up and starts being something you reach for. Treat “merge queries power query” as a small repeatable workflow rather than a one-off click you hope to remember next time. Use a small test block before the live file, so any surprise in the affected cells shows up while it is still harmless. When this is a ribbon command, the selection matters more than the button: confirm the range, apply the command, then spot-check the output before saving. That turns a data step that keeps your analysis trustworthy into a method you can reuse, explain, and defend when the workbook leaves your screen.

A worked example

Twelve monthly CSV exports in one folder, each with the same headers. Data ▸ Get Data ▸ From File ▸ From Folder ▸ pick the folder ▸ Combine & Transform. Power Query stacks all twelve, and the steps you then add — remove a blank column, set Date to date type, filter out cancelled rows — apply to every file. Next month, drop file thirteen into the folder and press Data ▸ Refresh All. Any cleaning routine you perform more than once is a query you should have built the first time — the second month costs one click instead of an afternoon. One habit worth forming early: name the cells that hold your inputs, so the formula reads in plain language instead of a string of cell addresses. A reviewer — or you in three months — can then follow the logic without decoding what B7 and D2 were supposed to mean, which is most of what makes a sheet maintainable.

In Google Sheets

Google Sheets handles this almost identically to Excel. The formula syntax above is the same, and the menu lives under a slightly different label rather than a ribbon tab. Use the platform toggle at the top of the page to switch every keyboard shortcut between Windows and Mac, and expect at most cosmetic differences in naming. Keep this page bookmarked for the next time the same question comes up. Better still, rebuild the example once in your own sheet — doing it yourself, with the tool above to check against, is what turns a copied formula into a technique you own. The short version of “merge queries power query”: the answer is at the top of this page, the tool proves it on your own numbers, and the sections above explain why it holds so the next variation does not stump you. Excel rewards people who reference cells instead of typing values and who keep inputs separate from formulas, because that is what makes a result you can audit months later. Build it once, deliberately, with the live tool as a check, and you convert a one-off lookup into a reusable skill — which is the whole point of learning the why and not just the what.

Common mistakes

  • Editing the loaded output on the sheet — the next refresh overwrites it. All edits belong in the query.
  • Skipping Change Type, so numbers arrive as text and every downstream total is wrong or zero.
  • Filtering on a value list, which hard-codes today's values into the step and silently drops new ones later.
  • Combining files whose headers differ slightly; the step records column names, so "Amount " with a trailing space breaks the append.
  • Loading a million rows to a worksheet instead of Close & Load To ▸ Connection Only ▸ Add to Data Model.
  • Building the same clean-up by hand each month when the query already exists and just needs Refresh.

Frequently asked questions

What is Power Query used for?

Importing data from files, folders, databases and the web, and cleaning it with steps that are recorded once and replayed on every refresh.

Where is Power Query in Excel?

On the Data tab as Get Data / Get & Transform. It is built into Excel for Windows from 2016 and Excel for Mac from 2019.

How do I unpivot data?

In the editor, select the columns that should stay, right-click ▸ Unpivot Other Columns. Wide month-per-column data becomes the tall layout PivotTables need.

Can Power Query combine multiple files?

Yes — Get Data ▸ From File ▸ From Folder ▸ Combine & Transform appends every identically shaped file in the folder, and picks up new files on refresh.

Is Power Query better than VLOOKUP?

For repeated joins across whole tables, yes: Merge Queries handles many-to-many and does not recalculate on every edit. For a single lookup in a live formula, XLOOKUP is simpler.