Excel Merge Cells Shortcut

The merge feature in Excel is not a feature that is frequently used. However, there may be circumstances when we might need to merge cells within the Excel sheet. This feature is mainly used in data formatting to make the layout or appearance of the sheet look better and properly organized. The merge feature in Excel typically helps us combine several selected cells’ contents into a single, new, larger cell. Specifically, we use this excellent feature to create a label that spans multiple criteria.

Excel typically allows us to merge cells using the two traditional ways:

  • By using the Merge & Center tool in the ‘Alignment’ group under the Home tab from the ribbon
  • By using the Text controls in the Alignment tab of the Format Cells dialogue box

These traditional ways seem a bit longer when we need to use this particular feature quite a bit. Besides, Excel does not have any default or definite shortcut to merge cells, like Ctrl + C to copy. However, some alternate ways or shortcuts can be used to merge cells in Excel quickly.

Excel Merge Cells Shortcut

This article discusses some Excel Merge Cells Shortcuts that will help us merge the desired cells in the worksheet accordingly with ease. Furthermore, these shortcuts to merge cells in Excel will also help us boost our working speed and overall work productivity. Before discussing the shortcut, let us first understand the different options associated with the Merge command.

Understanding Alignments Options of Merge

When we go through the ‘Merge & Center’ option from the ribbon, we see four different options with different functionalities. They are:

  • Merge & Center: This option helps users merge the desired cells into one and align the text in the selected cell as the center.
  • Merge Across: This option helps users merge the desired cells into one and align the text in the selected cell as the right.
  • Merge Cells: This option helps users to merge the desired cells into one with the default alignment.
  • Unmerge Cells: This is the reversal of the merge command. That means it helps users to remove all the merged cells and allocate the value to once.

Excel Merge Cells Shortcut

Merge Cells Shortcuts in Excel

The following are some essential shortcuts to merge cells in Excel:

  • By Using Default Keyboard Shortcut Keys
  • By Using Custom Keyboard Shortcut Keys
  • By Using the Quick Access Toolbar Shortcut

Let us now discuss each of the above-listed methods in detail:

Merge Cells by Using Default Keyboard Shortcut Keys

Using the Keyboard shortcuts is the fastest and most effective way of performing any task in Excel as Excel supports an extensive range of shortcut keys. Although there is no direct shortcut key for merging cells in Excel, we can use the method of Alt key. Using the Alt key in Excel enables certain key characters and associates them with commands on the ribbon. This way, we can press series of keys and perform associated commands directly from the ribbon.

When merging cells in Excel, we need to press the Alt key followed by H, M, and C sequentially, i.e., Alt > H > M > C or Alt + H + M +C. We need to follow the below steps to merge cells in Excel using the keyboard shortcut keys:

  • First, we need to select all the cells to merge and press the Alt key on the keyboard. As soon as we press the Alt key, Excel displays some characters or letters for each tab on the ribbon. It looks like this:
    Excel Merge Cells Shortcut
    Since the ‘Merge and Center’ option is located under the ‘Home’ tab, we need to press the key ‘H’ on the keyboard to go inside the ‘Home’ tab.
  • After pressing the key ‘H’, we will see that Excel further displays more letters linked with the options under the ‘Home’ tab, such as:
    Excel Merge Cells Shortcut
    In the above image, we see that the letter ‘M’ is associated with a ‘Merge & Center’ option. Therefore, we must press the key ‘M’ on the keyboard.
  • Upon pressing the ‘M’ key, Excel further displays more options available under ‘Merge & Center’ with some specific keys with each option.
    Excel Merge Cells Shortcut
    Since we need to choose the option ‘Merge and Center’, so we must press the key ‘C’ because the letter C is associated with the desired option, as shown in the above image.

This way, we use the shortcut Alt + H+ M +C. That is how we can merge and center the desired cells in Excel using the keyboard shortcut. Likewise, we can use the shortcut Alt + H + M + A to merge the desired cells into one and align the cell’s text to the right side. Moreover, we can use Alt + H + M + M to merge the desired cells into one with the default alignments. Besides, we can unmerge cells using the shortcut Alt + H + M + U.

Merge Cells by Using Custom Keyboard Shortcut Keys (Macros)

Although we can merge cells using the previous shortcut, it is a bit longer due to multiple keys in sequence. Therefore, we can create a custom shortcut key that will be easier to remember. For this, we use the Macro feature of MS Excel. We need to follow the below steps to configure a custom shortcut that can be used whenever we want to merge cells using a shortcut in Excel:

  • First, we need to open Microsoft Visual Basic for Applications by using the shortcut Alt + F11. Once the VBA window is displayed, we need to go to the Insert tab and then select the Module.
    Excel Merge Cells Shortcut
  • On the edit window (edit module window), we need to insert the following code:
  • After the code has been inserted, we must save it to a file and then close the window. Next, we need to launch the Macro dialogue box by using the shortcut key Alt + F8. It looks like this:
    Excel Merge Cells Shortcut
  • In a macro dialogue box, we must click the Options button and then enter the desired shortcut key. It is important to note that if we assign any shortcut that is already present in Excel, then the created shortcut will replace the existing one with a new one.
    Therefore, we use the shortcut Ctrl + Shift + J, such as:
    Excel Merge Cells Shortcut
    Once we have assigned the shortcut, we need to click the OK button and close the Macro dialogue box.

This way, we create a custom shortcut Ctrl + Shift + J to merge cells in Excel. Now, whenever we want to merge cells, we only need to select the corresponding cells and use the shortcut we created.

If we want to merge cells and make the value into a center, we need to add the following line to our code:

If we want to merge cells and also make the text to be in the center of the cell vertically, we need to include the following line in our code:

Finally, our code will look like this:

The following image displays how our code will look in the edit module window/ VBA editor:

Excel Merge Cells Shortcut

Note: Since the macro feature is used to create a custom shortcut for merging cells in Excel, it requires a modern version of Excel and a macro-enabled workbook. This can be a problem if the workbook is obtained from an untrusted source because a macro-enabled workbook may also contain suspicious code or macro viruses.

Merge Cells by Using the Quick Access Toolbar Shortcut

Another method to merge cells in Excel using the shortcut involves the use of quick access toolbar. Excel allows us to add quick shortcuts of the desired command in a toolbar. We only need to add the desired shortcut once, and it will be available every time we open Excel. This way, we can also add a shortcut of the ‘Merge & Center’ feature in the Quick Access Toolbar. We need to follow the below steps to configure a shortcut and access it directly from the quick access toolbar:

  • First, we need to navigate to the ribbon and go to Home > Merge & Center.
    Excel Merge Cells Shortcut
  • Once we locate the ‘Merge & Center’ shortcut in the ribbon, we need to right-click on it to access the menu options.
    Excel Merge Cells Shortcut
  • Next, we need to click on the option ‘Add to Quick Access Toolbar’ from the displayed list of right-click menu options.
    Excel Merge Cells Shortcut
  • Upon clicking on the above option, a new shortcut will be added to the quick access toolbar. It looks like this:
    Excel Merge Cells Shortcut
    Once the shortcut is added, we can use this shortcut to quickly merge the cells and align them to the center whenever needed.

Similarly, we can add shortcuts for other options of the merge. For this, we need to go to the Home tab and then click on the Merge & Center. It will list relevant features of the merge option, such as merge & center, merge across, merge cells, and unmerge cells. Now, we can right-click on any of the displayed options and add the corresponding shortcut on the quick access toolbar accordingly.

Example of Merge & Center using the Merge Cells Shortcut

Let us take an example of the following Excel workbook where we need to merge cells from A1 to G1, A2 to A3, B2 to C2, D2 to E2, and F2 to G2.

Excel Merge Cells Shortcut

We will be using the shortcut Alt + H + M + C during this example. Therefore, Excel will display a warning saying that the data from all the cells will be lost excel only the upper-left cell. We need to follow the below steps:

  • First, we need to select the cells from A1 to G1 and then press the keyboard shortcut keys (i.e., Alt + H + M + C) in sequence. We will see a warning dialogue. We need to click the OK button.
    Excel Merge Cells Shortcut
    After clicking on the OK button, we will get the following result:
    Excel Merge Cells Shortcut
  • Next, we need to select the cells from A2 to A3. After selecting the cells, we need to use the shortcut keys. Alternately, we can press the F4 key to perform the last performed action. However, we might first need to press the Fn key before using the F4 key, depending on the system settings. After this, we get the cells merged as desired:
    Excel Merge Cells Shortcut
  • After that, we need to select the cells from B2 to C2 and press the shortcut keys. This gives the following result:
    Excel Merge Cells Shortcut
    Similarly, we can merge cells D2 to E2 and F2 to G2.
    After merging all the desired cells, our Excel sheet looks like this:
    Excel Merge Cells Shortcut

This way, we can organize the data using the merge feature in MS Excel using the Excel Merge Cells Shortcuts.

Important Points to Remember

Before we use any of the above-discussed shortcuts to merge cells in Excel, we must know some important points to keep on our mind. They are as follows:

  • Excel Merge shortcuts only help us merge the cells into one cell, but not the text stored in these cells.
  • If we use Merge and Center shortcuts on multiple cells, the text of only the upper-left most cell is taken, and the rest cells and their data are deleted. However, when the merging cells contain values, Excel asks for permission before merging them.
  • When merging cells of the same length many times, it is easier to use format painter instead of repeating the steps of merging cells. This can eliminate the use of unnecessary steps and save some time.
  • When the workbook contains merged cells, it becomes tough to select the respective rows or columns using the row/ column header (or Ctrl + Space). Most of the time, all the merged cells of the corresponding area are selected.

Previous articleData validation in Excel
Next articleExcel Save As Shortcut