Shortcut key to merge cells in Excel.

–1 vote
asked by about Microsoft Office Excel
edited by

What is the shortcut key to merge cells in Excel?

2 Answers

0 votes
answered by (12.7k points)

It helps to merge two spreadsheets...

You could use something like;

Sub MergeRange()
Dim MergeRange As Range
Set MergeRange = Application.InputBox("Select Cells To Merge", "Merge Cells", Type:=8)
MergeRange.MergeCells = True

End Sub

Then to assign a shortcut key click on Tools>Macro>Macros

Select this Macro and click on Options to set your shortcut key.

0 votes
No avatar answered by (193k points)

Unfortunately, there is no Excel shortcut key available to merge cells, but you can create one using a macro. Right-click on the main toolbar and select Customize the Ribbon. Check the Developer box from the Main tabs list and click OK. Open the Developer tab, click the enter image description here icon and then press the first icon below ActiveX Controls. Click anywhere on the worksheet and drag a command button. Next, right-click the button and select View Code: enter image description here. In the opened window type:

Sub MergeCells1()
    Selection.Merge
End Sub

After that, go to Microsoft Excel Options, select Quick Access Toolbar and from the Commands list select Macros. Click on the Merge Cells macro and add it in the customization window. Click OK and then press the Alt key. The shortcut for the Merge Cells command will appear next to its icon in the Quick Access Toolbar: enter image description here (4 in my case).

Note: Also, you can use Ctrl+1, A, Alt+M, Enter sequence to merge cells.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register
...