In Excel Power Query, Merge joins two queries side by side using one or more matching columns; Append stacks rows from one query under another. Use Merge to bring related fields together, and Append to combine similar records into a longer list.
The basic difference
Think of Merge as a lookup or database join, and Append as adding one list beneath another. A merge uses a key—such as Customer ID—to find related rows in a second table. An append combines the rows from multiple tables into one query. The right choice depends on whether your sources describe related information or separate batches of the same kind of information.
| Operation | What it combines | Typical example |
|---|---|---|
| Merge | Columns from matching records | Add customer region to each order |
| Append | Rows from similar lists | Combine January and February orders |
Both actions create a Power Query result; they do not simply alter the original source tables. You can then load the result to a worksheet or the Data Model and refresh it when the source data changes.
What Merge does
Merge compares a column, or a set of columns, in one query with corresponding columns in another. Those selected fields are the join keys. Power Query finds rows whose key values match according to the join type you choose, then lets you add fields from the second query to the first.
For example, suppose an Orders query has Order ID, Customer ID, Date, and Amount, while a Customers query has Customer ID, Name, and Region. Merge Orders with Customers using Customer ID, then expand Name and Region. The result keeps the order information and adds the relevant customer details. This is useful for enriching a fact table with descriptive fields, combining data from separate systems, or checking which records exist in one source but not another.
In Excel for Microsoft 365 on Windows, open a query in the Power Query Editor, select Home > Merge Queries, and choose the second query in the dialog. Select the matching column in each preview. For a composite key, hold Ctrl while selecting multiple columns in the same order in both previews. Choose a join kind, confirm, and expand the resulting table column to select the fields you want.
Merge does not necessarily create one output row for every row in the first query. Its result depends on the join kind and on how many matching rows exist. If a key appears several times in both tables, one row can match multiple rows, multiplying records in the output. Check key uniqueness when you expect one customer record per order.
Merge join types explained
The join kind controls which rows are retained. In Power Query’s Merge dialog, the common choices are:
- Left Outer: keeps every row from the first query and adds matching rows from the second. This is a common choice when the first query is the main list.
- Right Outer: keeps every row from the second query and its matches from the first.
- Full Outer: keeps rows from both queries, whether or not they have a match.
- Inner: keeps only rows with matches in both queries.
- Left Anti: keeps rows from the first query that have no match in the second.
- Right Anti: keeps rows from the second query that have no match in the first.
Anti joins are especially useful for reconciliation. For example, a Left Anti join between a current product list and an inventory list can reveal products with no inventory match. A Full Outer join can help expose missing matches on either side, although you may need to inspect the expanded columns to see which source supplied each row.
What Append does
Append combines rows from two or more queries into one. It is the better fit when each query represents the same kind of record: separate monthly sales exports, regional transaction files, or successive snapshots with compatible fields. In the Power Query Editor, select Home > Append Queries. Choose two tables or the option to append three or more, select the queries, and confirm.
Power Query aligns appended fields by column name, not by their position in the source. If one query has a column called Amount and another has a column called Sales, Power Query treats them as separate fields rather than assuming they mean the same thing. The combined result can therefore contain both columns, with null values where a source did not supply that field. Rename equivalent fields consistently before appending if you want them in one output column.
Columns present in only some of the inputs are allowed. Rows from a source without a particular column receive null for that field. That flexibility is useful when a new field appears partway through a reporting year, but it can also hide inconsistent source layouts. Review the output’s column names and data types rather than assuming all files had identical structures.
Append is not a deduplication operation. If the same transaction appears in two monthly files, both copies remain in the result unless you add a separate cleanup step, such as removing duplicates using appropriate identifying columns. Likewise, appending does not automatically sort the combined rows into date order.
How to choose between them
Start by asking what one output row should represent. If it should represent a record from one list with extra details from another, Merge is probably right. If it should represent one record drawn from several batches of the same list, Append is probably right.
- Choose Merge to add product category to sales using Product ID, attach employee names to timesheets using Employee ID, or compare customer lists using an email or account key.
- Choose Append to combine quarterly sales exports, join identically structured branch files into one transaction list, or stack archived and current records.
- Use both when needed: append monthly order files first, then merge the consolidated orders with a product lookup to add descriptions.
A useful mental model is horizontal versus vertical. Merge generally widens a result by adding fields, while Append generally lengthens it by adding records. “Generally” matters: a merge can increase row counts when keys are repeated, and an append can widen the result when its inputs have different column names.
Common problems and how to prevent them
Unexpected extra rows after a merge: inspect whether the key is unique in the lookup query. If a Customer ID occurs three times in the second query, a matching order may appear three times after the merge. Remove or resolve duplicates only when the business rules support doing so; choosing an arbitrary duplicate can attach incorrect details.
No matches despite values that look identical: check data types, spaces, punctuation, and formatting. A number stored as text may not match a numeric key, and leading or trailing spaces can make text keys differ. In the Editor, review the type icons and consider applying consistent types or cleaning steps such as Trim before merging. Do not remove characters that are meaningful parts of an identifier.
Unexpected columns after append: compare the headers in every input. Small naming differences, such as “Customer ID” and “CustomerID,” create separate columns. Standardize names before append, and inspect nulls in the resulting fields to identify missing source data.
Wrong join direction: the first and second queries matter for Left Outer and Left Anti joins. Put the list whose rows you want to preserve on the left, or choose a different join kind deliberately. Read the dialog’s join description before confirming, especially when switching between left, right, and anti joins.
Confusing a blank with a missing match: a blank value in a source field is not the same as a row that failed to match. After a merge, expand a field that should be populated, or use a reliable key from the second query to distinguish unmatched rows from matched rows with blank details.
Refresh, loading, and workflow
Merge and Append are steps in a query, so they can be repeated when you refresh the query from its sources. This makes them more maintainable than manually copying and pasting new rows or lookup fields every reporting period. Keep source files and column names stable where possible, and review the result after a source schema changes.
For an efficient workflow, prepare each input before combining it: set appropriate data types, remove irrelevant columns, standardize headers, and make keys consistent. Give queries descriptive names, such as “Orders_AllMonths” or “Customers_Lookup,” and name important steps clearly. After the combination, validate row counts and a few known records against the source data. For Merge, check match coverage and duplicate keys; for Append, check that each source contributes the expected number of rows.
On Windows, query editing is available in Excel for Microsoft 365. Excel for Mac also includes Power Query, but available connectors and some authoring details can differ by Excel version and source. Excel for the web has different Power Query capabilities; if you cannot create or edit a particular query there, use the desktop app. Regardless of platform, the operation’s basic purpose remains the same: Merge matches records; Append stacks them.
Frequently Asked Questions
Does Power Query Merge work like VLOOKUP?
It can solve a similar task—bringing related fields into a table using a key—but Merge is a query transformation rather than a worksheet formula. It also offers several join types and can return multiple matches, so duplicate keys may produce multiple output rows.
Does Append remove duplicate rows?
No. Append combines the rows it receives and preserves repeated records. If duplicates are not valid, add a separate deduplication step based on the fields that identify a unique record, and confirm that this rule fits your data.
Do column names have to match for Append?
No, but matching names are treated as the same field. Different names become separate output columns, and missing fields are null for the relevant source rows. Standardize headers when differently named columns represent the same information.
Can I merge on more than one column?
Yes. Select the corresponding columns in both previews in the same sequence, using Ctrl for additional selections in the Windows dialog. Composite keys can help when one field alone is not unique, such as matching on both Store ID and Product ID.
Can I use Merge and Append in the same workflow?
Yes. For example, append several monthly files into one sales query, then merge that result with a product lookup. Each step addresses a different task: the first consolidates like records, and the second adds related attributes.
Related
- Excel Page Break Lines Won’t Go Away? How to Hide Them
- Excel Page Break Dotted Lines: Meaning and Fixes Explained
- Excel Page Break Header: Repeat Headings on Every Page
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Clear Calendar Cache in New Outlook: Step-by-StepTo clear the calendar cache in New Outlook for Windows, open Settings > General > Privacy and data,…
- How to Add a Checkbox in Google Sheets and Make It WorkTo add a checkbox in Google Sheets, select the cell or range where you want it, then choose…
- Excel Find and Replace Opens File Explorer? Why It HappensNo: in Excel for Microsoft 365 on Windows, Ctrl+H opens the Find and Replace dialog, not File Explorer.…
- Create Labels in Word for Microsoft 365: Step by StepTo create labels in Word for Microsoft 365, open the desktop app, choose Mailings > Start Mail Merge…
- Does Google Sheets Have XLOOKUP? How to Use ItYes. Google Sheets has a built-in XLOOKUP function that finds a value in one range and returns the…
- Excel Time Zones: How Date and Time Conversion WorksExcel does not assign a time zone to a date or time value: a worksheet cell holds a…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.