How to Merge Cells in Excel — Every Method Explained
What Does "Merge Cells" Mean in Excel?
Merging cells in Excel means combining two or more adjacent cells into a single, larger cell. The resulting merged cell takes up the space of all the original cells, and its content is displayed as one unified block.
This is most commonly used for:
- Spreadsheet headers — spanning a title across multiple columns
- Report layouts — creating sections and visual groupings
- Combining data — joining first name and last name, city and state, etc.
- Dashboard design — building clean, readable summary views
There are two distinct types of merging you'll encounter:
- Layout merging — physically combining cells on the spreadsheet (Merge & Center)
- Data merging — combining the text content of two cells into one cell using formulas or VBA
Both are covered in this guide.
Method 1: Merge & Center (The Quick Way)
This is the most common way to merge cells in Excel and the one most beginners use first. It merges the selected cells into one and centers the content horizontally.
How to do it:
-
Select the cells you want to merge (e.g., A1 and B1)
-
Go to the Home tab in the Excel ribbon
-
In the Alignment group, click the Merge & Center dropdown arrow
-
Choose one of the four options:
- Merge & Center — merges and centers content
- Merge Across — merges each row separately (useful for multiple rows)
- Merge Cells — merges without centering
- Unmerge Cells — splits a previously merged cell back apart
Important warning: When you merge cells that both contain data, Excel will only keep the content of the upper-left cell and discard everything else. Always make sure you've moved or copied the data you need before merging.
Best used for: Headers, titles, labels — anywhere you want visual formatting rather than data combination.
Method 2: Merge Two Columns Using the CONCAT Formula
If you want to combine the content of two cells — like merging a first name column with a last name column — you should use a formula, not the Merge & Center button. This preserves both values in a new combined cell.
The formula:
=CONCAT(A2, " ", B2)
Or using the ampersand operator (works in all Excel versions):
=A2&" "&B2
Example:
| A (First Name) | B (Last Name) | C (Full Name Formula) | | John | Smith | =A2&" "&B2 → John Smith | | Sarah | Johnson | =A2&" "&B2 → Sarah Johnson |
For more complex combinations:
=CONCAT(A2, ", ", B2, " | ", C2)
This lets you add any separator — a space, a comma, a dash, or nothing at all.
Best used for: Combining first and last names, addresses, product codes, or any text data across columns.
Method 3: Merge Cells Using Flash Fill
Flash Fill is one of Excel's most underused features. It recognizes patterns in your data and automatically fills in the rest — no formula needed.
How to use Flash Fill to merge cells:
-
In a new column (e.g., column C), type the merged result for the first row manually
- Example: If A2 = "John" and B2 = "Smith", type "John Smith" in C2
-
Start typing the result for the second row
-
Excel will detect the pattern and show a grey preview for all remaining rows
-
Press Enter to accept the suggestion
Keyboard shortcut: Ctrl + E triggers Flash Fill instantly.
Best used for: Quick one-time merges where you don't want to write a formula. Not ideal if your data updates regularly.
Method 4: Merge Cells Using Power Query
Power Query is Excel's built-in data transformation tool, available in Excel 2016 and later. It's perfect when you need to merge columns as part of a larger data cleaning workflow.
How to merge columns in Power Query:
- Select your data range and go to Data → Get & Transform Data → From Table/Range
- In the Power Query editor, hold Ctrl and click to select the two columns you want to merge
- Right-click and choose Merge Columns
- Choose a separator (space, comma, tab, custom)
- Give the new column a name and click OK
- Click Close & Load to bring the merged data back into your spreadsheet
Best used for: Large datasets, recurring data imports, or when you're already using Power Query for other transformations.
Method 5: Merge Cells Using VBA Macro
If you need to merge cells automatically — on a schedule, with a button click, or as part of a larger workflow — VBA is your best option.
VBA code to merge cells (layout merge):
vba
Sub MergeCells()
Range("A1:C1").Merge
Range("A1").HorizontalAlignment = xlCenter
Range("A1").Value = "Quarterly Sales Report"
End Sub
VBA code to combine cell content (data merge):
vba
Sub CombineColumns()
Dim lastRow As Long
lastRow = Cells(Rows.Count, "A").End(xlUp).Row
Dim i As Long
For i = 2 To lastRow
Cells(i, 3).Value = Cells(i, 1).Value & " " & Cells(i, 2).Value
Next i
End Sub
This macro loops through every row and combines columns A and B into column C — perfect for merging thousands of names or addresses at once.
How to run this macro:
- Press Alt + F11 to open the VBA editor in Excel
- Go to Insert → Module
- Paste the code above
- Press F5 or click Run
Don't want to write VBA yourself? Use our free VBA Macro Generator — just describe what you need in plain English and get the code instantly.
Best used for: Automating repetitive merges, bulk data processing, scheduled reports.
Method 6: Use MergeExcelFiles.org (No Formula, No Code)
If you need to merge cell content across an entire column — without writing a single formula or opening the VBA editor — our free browser tool handles it for you.
How it works:
- Go to mergeexcelfiles.org/merge-excel
- Upload your Excel file (or drag and drop it)
- Select the columns you want to combine
- Choose your separator (space, comma, dash, or custom)
- Download the merged file instantly
Your file never leaves your browser — no upload to any server, no signup required. It works on Chrome, Edge, Safari, and Firefox, on both desktop and mobile.
Best used for: Quick one-click merges with no technical knowledge required.
How to Merge Cells in Excel Without Losing Data
This is the most common problem people run into. When you use Merge & Center, Excel only keeps the content of the upper-left cell and silently deletes everything else.
Here's how to merge cells without losing data:
Option 1 — Combine into a third column first:
- Use
=A1&" "&B1in column C to combine the values - Copy column C → Paste Special → Values only (to remove the formula)
- Delete columns A and B
- Now you have one column with all the data intact
Option 2 — Use our free merge tool: Our Merge Excel Tool combines columns without deleting any data. Select your columns, choose a separator, and download — all values are preserved.
How to Unmerge Cells in Excel
If you've inherited a spreadsheet with merged cells and need to split them back apart:
- Select the merged cell (or select all cells with
Ctrl + A) - Go to Home → Merge & Center dropdown
- Click Unmerge Cells
Excel will unmerge the cells, but only the top-left cell will have content — the rest will be empty. To fill in the empty cells after unmerging:
- Select the range
- Press
Ctrl + G→ Special → Blanks → OK - Type
=then press the Up arrow key - Press
Ctrl + Enterto fill all blank cells with the value above
Common Mistakes When Merging Cells in Excel
Mistake 1 — Merging cells in a data table Merged cells break sorting, filtering, and pivot tables. Never merge cells inside a data range. Only use Merge & Center for headers or layout areas outside your data.
Mistake 2 — Using Merge & Center to combine data If both cells have content you need, Merge & Center will delete one of them. Use CONCAT or our merge tool instead.
Mistake 3 — Forgetting to unmerge before sorting Excel will throw an error if you try to sort a range that contains merged cells. Unmerge first, sort, then remerge if needed.
Mistake 4 — Merging non-adjacent cells Excel only allows merging adjacent (touching) cells. You cannot merge A1 and C1 while leaving B1 separate.
Merge Cells in Excel — Keyboard Shortcuts
There is no default keyboard shortcut for Merge & Center in Excel, but you can create one or use the Alt key sequence:
- Alt → H → M → C — Merge & Center
- Alt → H → M → A — Merge Across
- Alt → H → M → M — Merge Cells (no centering)
- Alt → H → M → U — Unmerge Cells
You can also assign a custom shortcut via File → Options → Customize Ribbon → Keyboard Shortcuts.
Frequently Asked Questions
How do I merge cells in Excel without losing data?
Use the =A1&" "&B1 formula or =CONCAT(A1," ",B1) to combine cell content into a new column before merging. This preserves both values. Our free Merge Excel Tool also handles this automatically.
How do I merge two columns in Excel?
Select a blank column and use the formula =A2&" "&B2 to combine the content of columns A and B. Drag the formula down to apply it to all rows, then copy and paste as values to finalize.
Can I merge cells in Excel on Mac?
Yes. The Merge & Center button is in the same location on Mac — Home tab → Alignment group → Merge & Center. The Alt key shortcuts won't work on Mac, but you can use the menu instead.
Why can't I merge cells in Excel?
The most common reasons are: (1) the sheet is protected — go to Review → Unprotect Sheet first; (2) you're in a formatted Table — convert to a range first via Table Design → Convert to Range; (3) you have multiple non-adjacent cells selected.
How do I merge cells in Excel and keep all text?
Excel's Merge & Center only keeps the upper-left cell's content. To keep all text, first combine the content using =CONCAT(A1," ",B1), copy the result, paste as values, then delete the original columns.
How do I merge cells across multiple rows?
Use Merge Across (Home → Merge & Center dropdown → Merge Across). This merges each row independently across the selected columns, rather than merging all selected cells into one giant cell.
Is there a shortcut to merge cells in Excel?
There is no single keyboard shortcut by default, but you can use Alt → H → M → C as a key sequence to trigger Merge & Center. You can also record a macro and assign it a custom shortcut.
How do I merge cells in Excel using VBA?
Use Range("A1:C1").Merge to merge a range. Add Range("A1").HorizontalAlignment = xlCenter to center the content. Use our free VBA Macro Generator to generate the exact code you need.
Final Thoughts
Merging cells in Excel sounds simple, but as you've seen, there are actually several different methods — each suited to a different situation. Here's a quick recap:
| Method | Best For | | Merge & Center | Headers and layout formatting | | CONCAT / & formula | Combining data from two columns | | Flash Fill | Quick one-time data merges | | Power Query | Large datasets and recurring imports | | VBA Macro | Automation and bulk processing | | MergeExcelFiles.org | No-code, instant merges in your browser |
Whether you're a beginner who just wants to center a title across columns, or an advanced user building automated reports with VBA, you now have every tool you need.
Ready to merge your Excel files or cells right now? Try our free browser-based tools — no upload, no signup, instant results:
- 🔗 Merge Excel Files — combine multiple workbooks into one
- 🔗 Split Excel Files — split sheets into separate files
- 🔗 VBA Macro Generator — generate Excel macros in plain English
- 🔗 Excel to Word Converter — convert spreadsheets to Word documents
