Excel allows you to merge several cells into a single large cell, which can be used to center text across several rows or columns. However, merged cells are notorious for creating problems in spreadsheets; especially if you're trying to sort, copy, paste, or move data. Because of this, it's generally best to avoid merging cells unless you absolutely have to.
Luckily, the Center Across Selection feature can give the same basic look as merged cells without creating problems in your spreadsheet. On the Home tab, first click the small arrow in the bottom-right corner of the Alignment group.
In the dialog box that appears, open the Horizontal menu and select Center Across Selection.
When you click OK, your cells will look like they've been merged, but they're actually separate cells. This means you'll still be able to work with the cells without encountering any of the problems associated with merged cells.
Center Across Selection only works horizontally, so for vertical groups of cells you may still need to merge cells.
Watch the video below to learn how to use the Center Across Selection feature.