Excel Auto Center: How to Center Cells Automatically
In this article
To auto center in Excel, select the cells you want to center and press the Center alignment button on the Home tab, or use the keyboard shortcut Ctrl+E (Cmd+E on Mac) for horizontal centering. For centering across a selection without merging, use Format Cells > Alignment > Horizontal: Center Across Selection. If you want Excel to center automatically as you type, you can set the alignment for entire rows or columns, or apply a cell style that includes centering. The exact steps depend on whether you want to center text horizontally, vertically, or both, and whether you are working on Windows, Mac, or Excel for the web.
What You'll Need
- Microsoft Excel installed on Windows or Mac, or Excel for the web (Office 365 account).
- A spreadsheet with data you want to center.
- Basic familiarity with selecting cells and using the ribbon or menu bar.
Step-by-Step
- Select the cells, rows, or columns you want to center. Click and drag over the range, or click a column letter or row number to select the entire column or row. To center the whole sheet, click the Select All button (the small square at the intersection of row and column headers).
- Go to the Home tab. In the Alignment group, you will see three horizontal alignment buttons: Align Left, Center, and Align Right. The exact icons may vary slightly by Excel version, but they are always in the Alignment group on the Home tab.
- Click the Center button. This centers the content horizontally within each selected cell. The keyboard shortcut is Ctrl+E on Windows and Cmd+E on Mac. Note: Ctrl+E also triggers Flash Fill in some contexts, so if Flash Fill activates, use the ribbon button instead.
- For vertical centering, in the same Alignment group, click the Middle Align button (the icon with lines centered vertically). This centers content between the top and bottom of the cell. You can combine horizontal and vertical centering for full centering.
- To center across multiple columns without merging, select the range, right-click, choose Format Cells, go to the Alignment tab, and under Horizontal choose Center Across Selection. Click OK. This centers the text across the selected columns while keeping each cell separate, which is safer for sorting and filtering than merging cells.
- To make centering automatic for new data, select entire rows or columns (or the whole sheet), apply the Center alignment, and then save the workbook as a template (.xltx). Any new workbook created from that template will have centered alignment by default. Alternatively, modify the Normal cell style: right-click the Normal style in the Styles gallery (Home tab > Cell Styles), choose Modify, click Format, set alignment to Center, and click OK twice. Be aware this changes the default for all cells using that style.
- For Excel for the web, the steps are similar: select cells, go to Home tab, and use the Center and Middle Align buttons in the Alignment group. The Format Cells dialog is available via right-click or Ctrl+1, but some advanced options may be limited compared to desktop versions.
- To center text in a merged cell, first merge the cells (select range, Home tab > Merge & Center), then use the Center button to adjust alignment if needed. Merging can cause issues with sorting and data entry, so use it sparingly.
Common Mistakes
- Using Merge & Center when Center Across Selection would work better. Merging cells can break sorting, filtering, and formulas that reference individual cells. Center Across Selection achieves the visual effect without merging.
- Assuming Ctrl+E always centers. In Excel, Ctrl+E is also the shortcut for Flash Fill, which can override centering. If Flash Fill activates, use the ribbon button or check Excel's settings.
- Centering only horizontally and forgetting vertical alignment. For tall rows, text may appear at the bottom. Use Middle Align to center vertically.
- Applying centering to the wrong range. If you select only part of a merged area or a single cell within a range, the effect may not be as expected. Always select the full range you intend to format.
- Modifying the Normal style without realizing it affects all cells. Changing the Normal style's alignment will center all cells that use that style, which may not be desired for the entire workbook.
Tips
- Use the Format Painter to copy centering (and other formatting) from one cell to another quickly.
- To center text in a header or footer, use the alignment buttons in the Header & Footer Tools Design tab.
- If you need to center text in a chart title or axis labels, use the chart formatting options (right-click the element > Format > Alignment).
- For consistent centering across multiple sheets, group the sheets (hold Ctrl and click sheet tabs) before applying alignment, then ungroup.
- Remember that centering affects only the display; the underlying data remains unchanged.
Troubleshooting
- Center button is greyed out: The worksheet may be protected. Go to Review > Unprotect Sheet (you may need a password). Also check if the workbook is shared or in a protected view.
- Text does not appear centered: Ensure you selected the correct cells and that the cell format is not set to a specific alignment (e.g., Left) that overrides the button. Check Format Cells > Alignment.
- Ctrl+E does not center: This shortcut may be assigned to Flash Fill. Use the ribbon button or customize the Quick Access Toolbar to add the Center command.
- Center Across Selection is not available: This option is only available in the Format Cells dialog, not as a ribbon button. Make sure you are in the Alignment tab and that the cells are not merged.
- Centering affects only part of a merged cell: Merged cells treat the entire merged area as one cell; alignment applies to the whole merged area. If you need different alignment within parts, avoid merging.
- Changes do not save: The workbook may be read-only or in a protected view. Check the title bar for [Read-Only] or [Protected View] and save a copy or enable editing.
Frequently Asked Questions
How do I center text across multiple columns without merging?
Select the range, right-click and choose Format Cells, go to the Alignment tab, and under Horizontal select Center Across Selection. Click OK. This centers the text across the selected columns while keeping cells separate.
What is the keyboard shortcut for centering in Excel?
The shortcut for horizontal centering is Ctrl+E on Windows and Cmd+E on Mac. However, Ctrl+E may also trigger Flash Fill, so if that happens, use the Center button on the Home tab instead.
Can I make Excel center automatically for new workbooks?
Yes, you can modify the Normal cell style to include centering, or create a template with centered alignment. Be aware that changing the Normal style affects all cells using that style.
Why is the Center button greyed out?
The worksheet may be protected. Go to Review > Unprotect Sheet. Also check if the workbook is in Protected View or read-only mode.
How do I center vertically as well as horizontally?
Use the Middle Align button in the Alignment group on the Home tab, in addition to the Center button. You can also set both in Format Cells > Alignment.
Does centering change the data in the cell?
No, centering only changes the display. The underlying value remains the same.