The basic command for merging cells in VBA is quite simple. Just make sure the paste area doesn’t overlap an existing merged cell. This will produce merged cells with the exact same dimensions.Ĭopy a merged cell using Ctrl + C then paste it into a new location using Ctrl + V. If you have a merged cell in your sheet already then you can copy and paste it to create more merged cells.
In the above example, the Merge and Center command is the third command in the QAT so the hotkey shortcut is Alt 3. When you press the Alt key, Excel will show you what key to press next in order to access the command. This will add the command to your QAT which is always available to use.Ī nice bonus that comes with the quick access command is it gets its own hotkey shortcut based on its position in the QAT. Go to the Home tab and right click on the Merge & Center command then choose Add to Quick Access Toolbar from the options. If you use the Merge & Center command a lot, then it might make sense to add it to the Quick Access Toolbar so it’s always readily available to use. Merge Cells with the Quick Access Toolbar Go to the Alignment tab in the Format Cells menu then check the Merge cells option and press the OK button. Right click on the selected cells and choose Format Cells.Go to the Home tab and click on the small launch icon in the lower right corner of the Alignment section.You can open the Format Cells dialog box a few different ways. This is the menu which contains all formatting options including merging cells. Merging cells is also available from the Format Cells dialog box. Merge Cells with the Format Cells Dialog Box Press Alt H M C in sequence on your keyboard to use the Merge & Center command. There is an easy way to access the Home tab Merge and Center command using the Alt key. Click on the Merge & Center command found in the Alignment section.Select the cells you want to merge together.The easiest way to merge cells is using the command found in the Home tab.
Merge Cells with the Merge & Center Command in the Home Tab Merging cells is an easy task to perform and there are a variety of places this command can be found. If no data is present in the selected cells, then no warning will appear when trying to merge cells. Only the data from cell B2 remains in the resulting merged cells. The above example shows the result of merging cells B2:C4 which contains text data. If the cells contain data or formulas, then you will lose anything not in the upper left cell.Ī warning dialog box will appear telling you Merging cells only keeps the upper-left value and discards other values. Merged Cells Only Retain the Top Left Values Now you should be able to merge cells inside the sheet. If the sheet has been protected with a password, then you will need to enter it in order to unprotect the sheet. This can be done by going to the Review tab and clicking the Unprotect Sheet command. In order to access the Merge option, you will need to unprotect the worksheet. If most of the other commands in the ribbon are greyed out too, then it’s likely the sheet is protected.
Merged cells are one of the most popular options used by beginner spreadsheet users.īut they have a lot of drawbacks that make them a not so great option.