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:
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.
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 Cells Shortcuts in Excel
The following are some essential shortcuts to merge cells in Excel:
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:
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:
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:
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:
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.
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:
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: