In Excel for Microsoft 365 on Windows, select the cell or range and press Alt, H, A, L to align text left, Alt, H, A, C to center it, or Alt, H, A, R to align it right. Press the keys in sequence, not all at once; these are Ribbon KeyTips that apply the selected alignment to the current selection.
Quick shortcuts for horizontal alignment
Excel’s Home tab offers left, center, and right alignment buttons in the Alignment group. On Windows, the corresponding key sequences are:
- Align left: Alt, H, A, L
- Center: Alt, H, A, C
- Align right: Alt, H, A, R
Start by selecting one or more cells. Tap Alt to show KeyTips over the Ribbon, then press H for Home, A for the Alignment commands, and the final letter for the alignment you want. You do not need to hold the keys down together. The selection can be a single cell, a row or column, or a rectangular range; Excel applies the command to every selected cell.
These shortcuts change how cell contents sit horizontally within their cells. They do not change the value, formula, number format, or order of the data. If you center a cell containing a date or a number, Excel still stores and calculates with the same date or number. You can use the matching alignment button on the Home tab if you prefer clicking or cannot use the keyboard sequence.
Vertical alignment and related commands
Horizontal alignment positions content from left to right. Vertical alignment positions it between the top and bottom edges of a cell, which is useful when a row is taller than usual or contains wrapped text. On Windows, select the cells and use these Home-tab KeyTips:
- Align Top: Alt, H, A, T
- Align Middle: Alt, H, A, M
- Align Bottom: Alt, H, A, B
For example, if a heading wraps onto three lines in a tall row, Align Middle places the block of text halfway between the cell’s top and bottom. It does not center the words horizontally; use the horizontal Center command as well if you want both directions centered.
Two nearby commands are often mistaken for alignment shortcuts. Wrap Text, reached with Alt, H, W on Windows, displays long contents on multiple lines inside a cell. Merge & Center is a separate command that combines selected cells and centers the remaining content; its KeyTips are Alt, H, M, C. Merging changes the cell structure and can discard contents in cells other than the upper-left one, so it is not a substitute for ordinary centering.
How to use the shortcut on a range
To format a block of cells at once, select the range before using the shortcut. For example, select B2:D8, then press Alt, H, A, C to center the contents of all 21 cells. If the range contains both labels and values, the command affects them all; Excel does not automatically distinguish headings from data.
- Click the first cell, then drag across the range, or use the Name Box to enter a range such as B2:D8.
- Confirm that the highlighted selection is the one you intend to format.
- Press the appropriate KeyTip sequence, such as Alt, H, A, L for left alignment.
- Click an unselected cell to check the result, or use the Undo command if you applied the wrong alignment.
To format an entire column, click its letter heading and use the shortcut. To select a whole worksheet, click the triangle at the intersection of the row and column headings, then apply the command. Worksheet-wide formatting can make a large sheet harder to scan, so it is often more useful to align only the relevant data area.
Choosing left, center, or right alignment
Alignment is a visual cue, not a calculation setting. A consistent layout helps people compare entries and identify the role of each column. A practical starting point is to left-align descriptive text, right-align many numeric values, and center short labels or status markers when that makes the table easier to read.
- Left alignment: Often works well for names, product descriptions, addresses, and other text that readers scan from the beginning of each line.
- Right alignment: Can make digits easier to compare because their right edges line up. Excel commonly right-aligns numbers by default.
- Center alignment: Can suit compact headings, month abbreviations, check marks, or short categories. Long centered text is usually slower to read.
For a sales table, for instance, you might left-align Product in column A and right-align Units and Revenue in columns B and C. A short heading row might be centered, but centering every description in a long report can create uneven starting points that make text harder to scan. Choose a pattern that communicates the data clearly and apply it consistently.
What the shortcut changes—and what it does not
Alignment affects the display inside cells. It does not insert spaces, add indents, reposition the worksheet grid, or change the cell’s underlying value. That distinction matters when data is copied, sorted, filtered, or used in formulas: aligning a number does not turn it into text, and left-aligning a number does not make it a text value.
When a cell’s contents are wider than the available space, alignment can also affect what you see. Text may appear to spill into an adjacent empty cell; if that neighboring cell contains data, the text is clipped from view. The value itself remains in the original cell. Widening the column, wrapping the text, or adjusting the font may solve the display issue more appropriately than changing alignment.
Indent is another separate formatting choice. It adds spacing between the cell edge and its contents, while left, center, and right alignment determine the basic horizontal position. Use the Increase Indent or Decrease Indent controls in the Home tab when you need a modest offset without adding leading spaces to the cell’s contents.
Using alignment on Mac and Excel for the web
The Alt, H, A sequences above are for Excel for Microsoft 365 on Windows. Mac keyboards and the Mac version of Excel use different shortcut conventions, so do not assume that pressing the same letters with Option or Command will produce the same result. On a Mac, select the cells and use the alignment controls on the Home tab; choose the left, center, or right alignment button in its Alignment group. This is also a dependable approach when a Mac shortcut conflicts with a system or application shortcut.
In Excel for the web, the desktop Windows KeyTip sequence may not behave exactly as it does in the Windows desktop application, particularly when browser shortcuts intervene. Select the range and use the Home tab’s alignment buttons in the browser. If you are following instructions written for a different platform, check whether the command is available in that version before relying on a keyboard sequence.
On Windows, KeyTips can be a useful alternative to memorizing a separate shortcut for every Ribbon command: press Alt and follow the letters displayed on screen. If a later Excel update or a customized Ribbon changes what you see, follow the displayed KeyTips rather than guessing. The visible labels are a quick way to confirm which command a sequence will activate.
Common problems and simple fixes
If a shortcut appears not to work, first check whether Excel has focus. Click a cell, make the selection, and try the sequence again. If the cursor is active inside a cell’s formula or text entry, Excel may treat keystrokes as editing rather than Ribbon navigation. Press Esc to leave cell editing, then apply the alignment command.
- The whole sheet changed: A whole-sheet selection may have been active. Click a single cell or select the intended range and apply the alignment again.
- The text still looks misplaced: Check whether the cell is vertically aligned differently, contains an indent, or is part of a merged area. Horizontal and vertical alignment are independent.
- Only part of a long entry is visible: Try widening the column or using Wrap Text. Alignment cannot make a long entry fit in a narrow cell.
- A sequence does something unexpected: Press Esc, then tap Alt and follow the KeyTips shown in your Excel window. Do not press all four keys simultaneously.
- A cell seems to ignore the setting: Check whether the cell is merged or whether the selection includes a protected sheet area where formatting is restricted.
For a quick reset, select the affected cells and choose the intended alignment again. If you want to remove several kinds of formatting rather than just fix alignment, use Home > Clear > Clear Formats carefully: that removes other formatting too, such as number formats, borders, and fills.
Alignment compared with other formatting choices
Alignment is only one part of making a worksheet readable. Font size, number format, column width, row height, borders, and wrapping can all affect the appearance of the same cell. For example, right-aligning a currency value may help digits line up, but an appropriate currency number format is what adds the currency symbol and controls decimal places.
Use the least disruptive option that solves the problem. If a heading needs more room, widen the column or wrap the text before merging cells. Merged cells can complicate sorting, filtering, selecting ranges, and filling formulas, especially in data tables. If a heading should span several columns visually, Center Across Selection is an alternative available through the Format Cells dialog in desktop Excel: select the cells, press Ctrl+1 on Windows, open the Alignment tab, and choose Center Across Selection from Horizontal. This centers the text across the selection without merging the cells.
Ctrl+1 opens Format Cells on Windows; it is not the shortcut for centering text. The dialog is useful when you need more control, including text orientation, indent, wrap settings, or a specific horizontal or vertical alignment. For routine left, center, and right formatting, the shorter KeyTip sequences or Home-tab buttons are usually more direct.
Frequently Asked Questions
What is the shortcut to center text in Excel?
In Excel for Microsoft 365 on Windows, select the cells and press Alt, H, A, C in sequence. This centers the contents horizontally; use Alt, H, A, M separately if you also want vertical middle alignment.
What is the shortcut to left-align text in Excel?
Select the cell or range and press Alt, H, A, L on Windows. The sequence applies left alignment to the selection without changing the contents or values.
What is the shortcut to right-align cells in Excel?
On Windows, select the cells and press Alt, H, A, R in sequence. It is useful for lining up numeric values, but alignment itself does not alter how numbers are calculated.
Can I center text without merging cells?
Yes. Use the ordinary Center command for each selected cell, or use Center Across Selection in the Format Cells dialog when you want a heading centered over several cells without merging them. The latter is a horizontal alignment option in desktop Excel.
Why do Alt, H, A, L shortcuts not work on my Mac?
Those KeyTips are for Excel on Windows. On a Mac, use the alignment buttons on the Home tab or check Excel’s current Mac shortcut list for your version; Windows KeyTip sequences are not interchangeable with Mac shortcuts.
Related
- Power Query: Get Excel Files From a Folder in Excel
- Power Query Excel Number Format: What You Can Control
- Power Query: Append Excel Files Into One Table
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Excel: Assign Unique Numbers to Duplicate Values in RowsYes. In Excel for Microsoft 365 on Windows, you can number each repeated value by its occurrence with…
- How to Concatenate a Long List in Excel with TEXTJOINTo concatenate a long list in Excel into one cell, use TEXTJOIN: with your items in A2:A1000, enter…
- Excel GROUPBY With Multiple Criteria: Filter ArraysTo group Excel data while applying multiple row-level criteria, use the filter_array argument in GROUPBY and combine AND…
- Average in Excel: Formula, Examples, and Common FixesTo calculate an average in Excel, use the AVERAGE function: if the numbers are in A1:A10, enter =AVERAGE(A1:A10)…
- Excel Date Minus 1 Year: Formula and Leap-Year RulesTo subtract one calendar year from a date in Excel, use =EDATE(A2,-12), assuming the original date is in…
- Excel DGET vs INDEX MATCH: Which Should You Use?For a normal lookup by one key, INDEX MATCH is usually the straightforward choice; DGET is useful when…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.