To center text horizontally in Excel for Microsoft 365 on Windows, select the cell or cells and press Alt, H, A, then C, one key at a time. This applies horizontal center alignment without using the mouse. Have the workbook open and the target cells selected first; the same command works for text and numbers.
What You’ll Need
- A Windows computer with Excel for Microsoft 365, or a recent Windows desktop version of Excel. The ribbon key sequence in this guide applies to the Windows desktop app.
- A workbook with the cell or range you want to format. Save a copy if you are making broad formatting changes to an important workbook.
- A keyboard. You do not need to change the cell contents, add spaces, or use a formula to center the display.
If you are using Excel for Mac, use the Mac note in the steps below. Excel for the web has a ribbon button too, but keyboard access keys can vary by browser and setup, so the button is the dependable fallback.
Step-by-Step
- Open the worksheet and locate the cells. Click the worksheet tab if needed, then identify the cell or cells whose contents should appear centered. The alignment command changes formatting, not the value stored in a cell. It will not move the cell or center text across the whole worksheet.
- Select the target cell or range. For one cell, use the arrow keys to move the active-cell outline onto it. To select adjacent cells, move to the first cell, hold Shift, and use the arrow keys to extend the selection. You can also select a range with Ctrl+G, type a range address such as
B2:D8in the Go To box, and press Enter. Check the selection before applying the shortcut: it is easy to format the active cell when you meant to format several. - Open the Home ribbon key tips. Press and release Alt. Small letters or key-tip labels should appear on the ribbon. Do not hold Alt while typing the rest of the sequence. If the letters do not appear, click inside the worksheet grid to give Excel focus, then press Alt again. Some keyboards or Windows configurations may require tapping the key rather than holding it.
- Choose the Home tab. Press H to open the Home tab key tips. On the standard Windows Excel ribbon, Home contains the Alignment group, where the horizontal alignment commands are located. If your ribbon has been customized, follow the displayed key-tip letters rather than guessing.
- Open the Alignment commands. Press A for the Alignment group commands. Excel displays another set of key tips. The shortcut is a sequence of ribbon access keys: Alt, then H, then A, then C. Pause briefly if needed to see each set of key tips before continuing.
- Apply horizontal center alignment. Press C. The contents of each selected cell are now aligned to the horizontal center of that cell. You should see the text or number move from its previous left or right position; the column width, row height, and cell value remain unchanged.
- Check the result and selection. Click another cell or use the arrow keys to leave the selected range, then confirm that the intended cells look right. If you centered only one cell by mistake, undo immediately with Ctrl+Z, select the correct range, and repeat the sequence.
Mac equivalent: In Excel for Mac, select the cell or range and press Command+E to apply horizontal center alignment. You can also use the Center button on the Home tab. Mac ribbon key tips do not follow the Windows Alt sequence, so do not expect Alt, H, A, C to work the same way. In Excel for the web, select the cells and choose Home > Center in the Alignment group if the Windows sequence is unavailable.
To center both horizontally and vertically, apply horizontal centering as above, then choose Middle Align. On Windows, use the ribbon key-tip sequence Alt, H, A, M. Horizontal Center and vertical Middle Align are separate settings: using only one will center the content in only that direction. This is especially useful for headings in tall rows or labels inside bordered table cells.
Common Mistakes
- Holding the keys down together. The Windows command is not a simultaneous shortcut such as Ctrl+C. Press and release Alt, then press and release each letter in order. The key tips guide you from one ribbon command to the next.
- Centering the wrong cells. Excel formats the selected range, not necessarily every cell that looks related. Confirm the highlighted selection before starting, especially if a table has blank cells or separate heading rows.
- Expecting center alignment to center text across columns. The command centers content inside each selected cell. It does not combine cells, center a heading over several columns, or change the cell boundaries. For a heading spanning columns, consider selecting the range and choosing Center Across Selection through the Format Cells alignment options, rather than merging cells automatically.
- Adding spaces to imitate centering. Leading spaces can make a value appear offset, but the result changes when a column is resized or the font changes. Use alignment formatting so the position adjusts with the cell.
- Confusing horizontal and vertical alignment. Center places content in the middle from left to right. It does not place it midway between the top and bottom of a tall cell. Use Middle Align as a separate command when you need both.
- Using the wrong platform shortcut. The Windows key sequence is not the Mac shortcut. On a Mac, use Command+E; on the web, use the ribbon button if access-key behavior differs.
Tips
- Format a large range at once. Select all intended cells before using the sequence. For a rectangular block, use Ctrl+G and enter its address. For an entire column, select a cell in that column and press Ctrl+Space; for an entire row, use Shift+Space. Then apply center alignment. Be careful: formatting a whole row or column may affect cells beyond the visible data.
- Use the key tips as confirmation. After pressing Alt, watch the labels Excel displays. They show the current key choices and can differ if ribbon customization or an interface change affects the sequence. If the next letter is not shown, pause and inspect the labels instead of continuing blindly.
- Combine horizontal and vertical alignment for titles. For a heading in a taller row, use the center command, followed by Middle Align. If the words wrap, use Home > Wrap Text or adjust the column width; centering does not prevent text from wrapping or being clipped.
- Keep alignment consistent. If several headings should match, select them together when possible and apply the setting once. For nonadjacent cells, hold Ctrl while selecting additional cells with the mouse, or format separate ranges one at a time. Verify the highlighted cells, since a selection can be easy to misread.
- Remember that formatting is reversible. Use Ctrl+Z right after an unwanted change. If you want to remove other formatting too, use Home > Clear > Clear Formats carefully: it removes formats such as number formats, borders, fills, and font styling, not just alignment.
Troubleshooting
Nothing happens after the sequence. First make sure Excel, rather than another app or a text-entry field, has focus. Press Esc once to exit a cell edit or dismiss an open menu, click a worksheet cell, and try again. Start with Alt and look for the key tips. If you do not see them, check that the ribbon is available and that your keyboard has not remapped the Alt key.
The sequence opens a different command. Key tips can change with ribbon customization, and Excel may be showing a different set of letters than expected. Press Esc to cancel the current key-tip sequence, tap Alt, and read the labels displayed on screen. Alternatively, use Home > Alignment > Center. This button is a practical fallback when the ribbon layout differs from the standard one.
Only one cell changes. The selection may have collapsed before you ran the command. Undo, select the full range again, and check that all intended cells are highlighted. If you used Ctrl+G, verify that the address is correct and that you pressed Enter to select it before formatting.
The content still looks off-center or is not visible. Check whether the cell is merged, whether text is indented, and whether the column is too narrow. A long value may be clipped or wrap onto multiple lines, making its visual position seem unexpected. Inspect Home > Alignment and Format Cells > Alignment for indent, text control, or other settings that can affect appearance. For a merged range, select the merged cell and apply alignment to that cell; do not assume neighboring cells are independent.
The text is centered horizontally but remains near the top or bottom. That is expected when only horizontal alignment was changed. Apply Middle Align as well. If it still appears misplaced, check the row height and any vertical text orientation setting in Format Cells > Alignment.
You are in Excel for the web or on a Mac. Use the platform-specific option rather than repeating the Windows sequence. In the web app, select the cells and click Center on the Home tab. On a Mac, select the range and press Command+E, or use the Center button on the Home tab. If your keyboard layout changes how a key is entered, the ribbon button avoids that shortcut issue.
Frequently Asked Questions
What is the keyboard shortcut to center text in Excel on Windows?
In Excel for Microsoft 365 on Windows, select the cell or range, then press and release Alt, H, A, and C in order. It applies horizontal center alignment. It is a ribbon key-tip sequence, not four keys held down at once.
How do I center text in Excel on a Mac?
Select the cell or range and press Command+E. You can also click Center in the Home tab’s Alignment group. The Windows Alt key-tip sequence is not the Mac equivalent.
How can I center text in multiple cells at once?
Select all the cells first, then run the center command once. You can drag across a range, extend a selection with Shift and the arrow keys, or press Ctrl+G and enter a range address such as A1:C10. The formatting applies to every selected cell.
Can I center text horizontally and vertically with one shortcut?
The Windows ribbon sequence for horizontal Center is Alt, H, A, C; vertical Middle Align is a separate command, Alt, H, A, M. Use both in succession when you want the content centered in both directions.
Does centering change the cell value or formula?
No. Center alignment changes how the cell’s contents are displayed, not the underlying text, number, date, or formula. You can switch the alignment back later without changing the value.
Why does the shortcut not work in my workbook?
Excel may not have focus, you may be editing a cell, or your ribbon key tips may differ. Exit edit mode with Esc, click a cell, press Alt, and follow the labels that appear. If needed, select the range and click Home > Center instead.
Related
- How to Align Text in Excel Without Merging Cells
- Align a Page in Excel for Printing: Center and Position
- How to Align a Picture in an Excel Cell: Step by Step
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Join Cells in Google Sheets: Merge or CombineTo join cells in Google Sheets by merging them, select the adjacent cells, then choose Format > Merge…
- Google Sheets Inventory Spreadsheet: Setup and TipsYes—Google Sheets can work as an inventory spreadsheet for tracking products, quantities, locations, reorder points, and stock value.…
- Excel Knowledge for Data Analysis: Skills That MatterExcel knowledge for data analysis means being able to organize data, clean it, calculate useful measures, summarize patterns,…
- Excel Data Validation Restrictions ExplainedExcel data validation restrictions control what users can enter in selected cells: choose the cells, then go to…
- Excel Find and Replace Regular Expressions ExplainedNo: Excel’s standard Find and Replace dialog does not interpret regular expressions. In Microsoft 365, use the REGEXREPLACE…
- Data Validation Multiple Selection in Excel: What WorksExcel’s built-in data validation list allows one selection per cell; it does not provide a native setting for…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.