0
0
Excelspreadsheet~7 mins

Merging queries (joins) in Excel - Step-by-Step Guide

Choose your learning style9 modes available
Introduction
Merging queries lets you combine data from two tables based on matching values. This helps you see related information together without copying or typing it again.
When you have a list of customers and a separate list of their orders and want to see orders next to customer names.
When you want to combine product details with sales data to analyze performance.
When you have employee info in one table and their department info in another and want a full view.
When you want to add address details to a list of contacts from another table.
When you want to compare two lists and find matching or missing items.
Steps
Step 1: Click
- Data tab > Get & Transform Data group > Get Data > Combine Queries > Merge Queries
The Merge dialog box opens showing available tables to merge
Step 2: Select
- Top dropdown in Merge dialog
The first table you want to merge is chosen
Step 3: Select
- Bottom dropdown in Merge dialog
The second table you want to merge is chosen
Step 4: Click
- Column(s) in the first table
The column(s) to match on are highlighted
Step 5: Click
- Column(s) in the second table
The matching column(s) in the second table are highlighted
Step 6: Choose
- Join Kind dropdown
The type of join (e.g., Left Outer, Inner) is selected
Step 7: Click
- OK button in Merge dialog
A new query is created combining data from both tables based on the join
Step 8: Click
- Expand icon next to the merged column in the query editor
You see a list of columns from the second table to add to the first
💡 Uncheck columns you don't need to keep your data clean
Step 9: Click
- Close & Load button
The merged data loads into a new worksheet or table
Before vs After
Before
Table1 has 10 customers with IDs; Table2 has 15 orders with customer IDs but no customer names
After
Merged table shows 10 customers with their matching orders including customer names and order details
Settings Reference
Join Kind
📍 Merge dialog box
Controls which rows from each table appear in the merged result
Default: Left Outer
Expand Columns
📍 Query Editor after merge, next to merged column
Choose which columns from the second table to add to the merged data
Default: All columns selected
Common Mistakes
Selecting columns with different data types for matching
Excel cannot match values if one column is text and the other is number
Ensure both columns have the same data type before merging
Choosing the wrong join kind, like Inner join when you want all records
Inner join excludes unmatched rows, so some data is missing
Use Left Outer join to keep all rows from the first table
Not expanding the merged column to see the joined data
Merged data stays hidden inside a single column
Click the expand icon and select columns to display merged data
Summary
Merging queries combines two tables based on matching columns to show related data together.
Choose the right join kind to control which rows appear in the merged result.
Always expand the merged column to see and use the joined data.