This guide shows you how to change the horizontal alignment of cell contents in Microsoft Excel, so you can position text or numbers to the left, center, or right within a cell. You’ll learn the quick toolbar method, the full Format Cells dialog, and how to handle wrapped text and merged cells. No prior Excel experience is needed—just a spreadsheet with some data.
What You’ll Need
- A computer with Microsoft Excel installed (2016, 2019, 2021, or Microsoft 365).
- An existing workbook or a new blank workbook with some data entered.
- A mouse or trackpad (keyboard shortcuts are also provided).
Step-by-Step
- Open your Excel file. Double-click the file to open it in Excel, or launch Excel and open the file from the Recent list.
- Select the cell or range. Click a single cell to align just that cell. To align multiple cells, click and drag over the range, or hold Ctrl (Windows) or Cmd (Mac) and click individual cells. To select an entire row or column, click the row number or column letter.
- Use the ribbon alignment buttons (quickest method). On the Home tab, look for the Alignment group (usually in the middle of the ribbon). You’ll see three horizontal alignment icons:
- Align Left (icon with lines aligned to the left) – moves content to the left edge.
- Center (icon with centered lines) – centers content horizontally.
- Align Right (icon with lines aligned to the right) – moves content to the right edge.
Click the desired button. The selected cells will immediately update.
- Use the Format Cells dialog (for more options). Right-click the selected cell(s) and choose Format Cells (or press Ctrl+1 on Windows, Cmd+1 on Mac). In the dialog, go to the Alignment tab. Under Horizontal, you’ll see a drop-down list with these options:
- General – default alignment (text left, numbers right).
- Left (Indent) – aligns left, with an optional indent value.
- Center – centers content.
- Right (Indent) – aligns right, with optional indent.
- Fill – repeats the cell’s content to fill the width (rarely used).
- Justify – wraps text and spaces it evenly across the cell width (only works with wrapped text).
- Center Across Selection – centers content across a selected range without merging cells.
- Distributed – spaces text evenly, including at the edges (similar to justify but works even with single lines).
Choose an option, then click OK.
- Adjust indent (if needed). In the same Format Cells dialog, under Horizontal, if you chose “Left (Indent)” or “Right (Indent)”, you can set an Indent value (e.g., 1) to add space from the edge. Click OK to apply.
- Apply alignment to an entire row or column. Click the row number or column letter to select the whole row/column, then apply any of the alignment buttons or the dialog method. This is useful for headers or entire data columns.
- Use keyboard shortcuts (optional). After selecting cells, you can use these shortcuts:
- Alt+H, A, L – Align Left (press keys sequentially).
- Alt+H, A, C – Center.
- Alt+H, A, R – Align Right.
On Mac, use Cmd+Option+Left/Right/C for left, right, center (depending on your Excel version).
- Check the result. Click outside the selection to see the final alignment. If the text appears cut off, you may need to adjust column width or enable text wrapping (see Tips).
Common Mistakes
- Selecting the wrong range. Applying alignment to a single cell when you meant to apply it to an entire column is a common error. Always double-check your selection before clicking the alignment button.
- Confusing horizontal with vertical alignment. The vertical alignment buttons (top, middle, bottom) are right next to the horizontal ones. Make sure you’re clicking the correct icons.
- Using “Center Across Selection” without selecting multiple cells. This option only works when you have a range of cells selected. If you select just one cell, it does nothing.
- Expecting justify to work without wrapped text. The “Justify” horizontal alignment only takes effect if the cell has “Wrap text” enabled. Otherwise, it may appear to do nothing.
- Overlooking merged cells. If you merge cells, the alignment applies to the merged cell as a whole. You cannot align different parts of the merged cell separately.
Tips
- Combine with vertical alignment. For a polished look, set both horizontal and vertical alignment. For example, center content both horizontally and vertically for a clean header.
- Use “Center Across Selection” instead of merging. This keeps your data intact and avoids merge-related issues (like sorting problems). Select the range, then in Format Cells > Alignment > Horizontal, choose “Center Across Selection”.
- Wrap text for long labels. If you have long text, enable Wrap Text (Home tab > Alignment group) before applying justify or distributed alignment. This makes the text fit within the cell and aligns properly.
- Set a default alignment for new workbooks. You can change the default font and alignment by modifying the Normal style (right-click on the “Normal” style in the Home tab > Cell Styles, choose Modify, then Format). This applies to new sheets in that workbook.
- Use the Format Painter. After setting alignment on one cell, double-click the Format Painter icon (Home tab, Clipboard group) and then click other cells to copy the same alignment quickly.
Troubleshooting
- The alignment buttons are grayed out. This usually means the sheet is protected. Go to Review tab > Unprotect Sheet (you may need the password). If the workbook is shared, you might need to unshare it first.
- Text still appears left-aligned after clicking “Center”. Check if the cell has a custom number format that includes spaces or characters. Also, ensure you’re not in “Edit” mode (double-clicking a cell enters edit mode; press Enter to exit).
- Alignment doesn’t apply to the whole merged cell. When cells are merged, you must select the merged cell (click it once) and then apply alignment. If you select only part of the merged range, Excel may not apply it correctly.
- Justify alignment doesn’t work. As mentioned, enable “Wrap text” for the cell. Also, make sure the column width is not too narrow; otherwise, the text may look cramped.
- Changes don’t stick after saving. Save the file in a format that supports formatting (like .xlsx). If you save as .csv, all formatting is lost. Use “Save As” and choose Excel Workbook.
Frequently Asked Questions
How do I center text across multiple cells without merging?
Select the range of cells, open Format Cells (Ctrl+1), go to Alignment, and under Horizontal choose “Center Across Selection”. This centers the content across the selected cells without actually merging them, preserving data integrity.
What is the difference between “Justify” and “Distributed” alignment?
Both spread text evenly across the cell, but “Justify” only works when text wraps to multiple lines, while “Distributed” works even on a single line, adding space between characters if needed. “Distributed” also aligns the last line, whereas “Justify” leaves the last line left-aligned.
Can I set a default horizontal alignment for all new cells?
Yes. Right-click the “Normal” style on the Home tab (in the Styles group, click “Cell Styles” and right-click “Normal”), choose Modify, then Format, and set your preferred alignment under the Alignment tab. This applies to all cells using the Normal style in that workbook.
Why does my number appear right-aligned even after I set it to left?
If you applied left alignment and the number still shows right, check if the cell has a custom number format that includes spaces or alignment characters. Also, ensure you didn’t accidentally apply alignment to a different cell. Try clearing all formatting (Home > Clear > Clear Formats) and reapply.
Does horizontal alignment affect sorting or formulas?
No. Alignment is purely visual and does not change the underlying data or calculations. Sorting and formulas work the same regardless of alignment.
How do I align text in a cell that is part of a table?
Select the cell(s) in the table and use the same alignment buttons on the Home tab. Table formatting does not override manual alignment. If the table style uses a specific alignment, you can override it by applying your own.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Fix Shockwave Flash Crashes in Firefox
- Fix Microsoft Account Apps Notification in Windows 10
- Printer Problems With macOS Catalina: Fixes
- CSS min(), max(), clamp(): How to Use Them
- How to Partition an External Hard Drive
- How to Transfer PicsArt Stickers from Android to PC