We sometimes combine cells in Excel to better organize our data. Other times, we do it for aesthetic reasons.
In this tutorial I’ll show you the basics of combining cells in Excel. Screenshots used in this tip are from Excel for Mac. You’ll find the same settings in Excel for Windows.
How to combine cells in Excel
In Excel’s terminology, we do not combine cells. We merge them.
We can merge adjacent cells vertically, horizontally, or both.
An example of merging them horizontally might be when we want to have a single header above two adjacent columns. Each of those columns may have their own sub-header.
To merge the cells that are above the two sub-header cells, simply click to select the first cell and hold while you drag across the second cell. You can also click in the first cell and hold the Shift key down while you click in the second cell.
In this example, only the first cell has text in it. If you merge two or more cells that each contain text, only the text in the first cell will remain. The text in the remaining cells will be lost.
Let’s say you’ve typed the header title in the first of the two cells that are to be merged. With the two cells selected, open the Home tab and click Merge & Center.
You should see the two cells appearing as one wider one with the header from the first cell centered across the merged cells.
Hint: You may want to merge the cells where the header title is originally left-aligned and you want the alignment to stay the same in the merged cells. Instead of clicking the Merge & Center button in the Home tab, click the arrow beside the Merge & Center button. Then choose Merge. Whatever alignment the header had before it was merged will remain.
You can also use the standard centering methods if you want to change the header alignment after you merge the cells. Click in the merged cell and use the Alignment buttons in the Alignment group under the Home tab.
The method is the same if you want to merge cells vertically. Just select the first cell, then the one below it. Use the merge button to join the two cells into one taller cell.
To make your merged cells stand out on your spreadsheet, you can set the fill and font color.
If you discover that you’ve merged the wrong group of cells or otherwise just don’t need them to be merged, select the merged cell. Then click the arrow beside the Merge button and choose Unmerge cells.
When merging cells in Excel might not be the best option
The Merge feature is best used in spreadsheets where you will not have to sort or filter the data under those merged cells. That is because attempting to manipulate data in columns under merged cells will probably not work as you wish it to.
If you know you are going to be sorting, filtering, or otherwise manipulating data in cells below the merged cells, you will be better served by just setting the alignment of the header across the range of cells instead of merging them.
To align the header across a range of blank cells, select the first cell in the range and drag across or hold the Shift key while you click the last cell in the range.
Right-click the selected cells. Choose Format Cells. Open the Alignment tab. Click the box below Horizontal Alignment. Select Center Across Selection. Click OK to save your settings.
This will give the same appearance as merged cells, but you’ll still be able to sort or filter the data below the header.
Final note: You may need to merge, or combine cells after adding rows or columns in Excel if the addition of those rows or columns moved your existing column headers.