Using an Excel Shortcut to Merge Cells – 3 Methods

Download Practice Workbook

Download the practice workbook.


The title of the dataset below doesn’t fit in B2.

Merge Cells Using Excel Shortcut

If you expand the column, the whole column will be expanded:

  • Select columns B, C, and D in row 2.
  • Choose Merge & Center in Alignment (Home tab).

Merge Cells Using Excel Shortcut

This is the output.

 


Method 1 – Using an Excel Shortcut to Merge & Center

  • To merge multiple cells and center align data, use this shortcut:
Alt+H+M+C

Consider the following dataset:

Merge Cells Using Excel Shortcut

It is divided based on products sold.

To merge cells in Column B and have a single cell for TV and Computer.

Steps

  • Select B5:B7.

Merge Cells Using Excel Shortcut

  • Press Alt+H+M+C one by one.

Merge Cells Using Excel Shortcut

  • Select B8:B10.

  • Press Alt+H+M+C.

Merge Cells Using Excel Shortcut

This is the output.

Cells are merged and center aligned.

Note:

This Excel shortcut doesn’t automatically change vertical alignment.

Read More: Shortcut for Merge and Center in Excel (3 Examples)


Method 2 – Using an Excel Shortcut to Merge Cells across Rows

  • Use:
Alt+H+M+A

This shortcut merges cells across columns. It automatically left-aligns cells.

Consider the following dataset:

The title is in B2. To merge C2 and D2:

Steps

  • Select B2:D2.

Excel Shortcut to Merge Cells across Rows

  • Press Alt+H+M+A one by one.

Excel Shortcut to Merge Cells across Rows

Cells are merged and left-aligned. (This shortcut works for columns only).

Note:

If you choose cells in multiple rows, this shortcut will merge the cells in individual rows. 

Read More: How to Combine Two Cells in Excel (6 Quick Methods)


Method 3 – Using an Excel Shortcut to Merge Cells into One Cell

  • Use:
Alt+H+M+M

You can use this shortcut to merge any number of rows and columns.

Consider the following dataset:

To merge multiple columns and rows and display data in a single cell:

Steps

  • Select B5:D7.

Excel Shortcut to Merge Cells into One Cell

  • Press Alt+H+M+M one by one.

Excel Shortcut to Merge Cells into One Cell

  • Select B8:D10.

  • Press Alt+H+M+M.

Excel Shortcut to Merge Cells into One Cell

Three rows and three columns are merged into a single cell.

Read More: How to Combine Cells into One with Line Break in Excel (5 Methods)


Using an Excel Shortcut to Undo Merged Cells 

You can unmerge cells merged using the previous methods pressing Alt+Z, but if you have a new workbook from another source, it won’t work.

  • To unmerge those cells, use:
Alt+H+M+U

Consider the previous dataset with merged cells:

To unmerge the cells with TV and Computer:

Steps

  • Select the cell containing TV.
  • Press Alt+H+M+U one by one.

Excel Shortcut to Effectively Undo the Merge Cells Commands

  • Select the cell containing Computer.
  • Press Alt+H+M+U.

Excel Shortcut to Effectively Undo the Merge Cells Commands

Cells are unmerged.


Create a Custom Shortcut with VBA Macros to Merge and Center Cells

This is the dataset:

Create Custom Shortcut to Merge and Center Cells

Steps

  • Press Alt+F11 to open Visual Basic Application.
  • Select Insert > Module.

  • Enter the following code:
Sub Merge_Cells()

With Selection
.HorizontalAlignment = xlCenter
.Merge
End With

End Sub
  • Save the file.
  • Press Alt+F8 to open the Macro dialog box.

  • Select Options.

Create Custom Shortcut to Merge and Center Cells

  • Enter Ctrl and a key. Here, Ctrl+j.
  • Click OK.
  • Select B5:B7.

Create Custom Shortcut to Merge and Center Cells

  • Press Ctrl+j.

Create Custom Shortcut to Merge and Center Cells

  • Select B8:B10.

  • Press Ctrl+j.

Create Custom Shortcut to Merge and Center Cells

Cells are merged and center aligned.

Read More: How to Combine Cells with Same Value in Excel (3 Easy Ways)


 Things to Remember

  • If you have multiple data in multiple cells, Excel will only show the upper-left value after merging. So, not to lose data, read this article: How to Merge Cells in Excel with Data (3 Ways)
  • You can’t perform sorting or filtering on merged cells.
  • You can’t copy and paste data into merged cells.

 

Related Articles

Get FREE Advanced Excel Exercises with Solutions!
A.N.M. Mohaimen Shanto
A.N.M. Mohaimen Shanto

A.N.M. Mohaimen Shanto, a B.Sc. in Computer Science and Engineering from Daffodil International University, boasts two years of experience as a Project Manager at Exceldemy. He authored 90+ articles and led teams as a Team Leader, meticulously reviewing over a thousand articles. Currently, he focuses on enhancing article quality. His passion lies in Excel VBA, Data Science, and SEO, where he enjoys simplifying complex ideas to facilitate learning and growth. His journey mirrors Exceldemy's dedication to excellence and... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo