How to Align Text and Numbers in Excel

How-to basics · Updated November 29, 2026

Aligning text and numbers in Excel makes your spreadsheet easier to read and more professional. You can align content horizontally (left, center, right) and vertically (top, middle, bottom), plus control indentation, wrap text, and merge cells for special layouts. The quickest way is to select cells and use the alignment buttons on the Home tab. This guide covers every alignment option, step by step, for Excel 365 on Windows, with notes for Mac and Excel on the web.

What You’ll Need

  • Microsoft Excel 2016 or later (Microsoft 365 recommended). Steps are for Windows, but Mac and web differences are noted.
  • A spreadsheet with data you want to align. You can practice on a blank sheet.

Step-by-Step

  1. Select the cells you want to align. Click and drag over a range, or click a column/row header to select whole columns or rows. To select non-adjacent cells, hold Ctrl (Windows) or Command (Mac) while clicking.
  2. Open the Alignment group on the Home tab. On the ribbon, go to Home > Alignment. You’ll see buttons for vertical and horizontal alignment, text wrapping, merging, and orientation.
  3. Set horizontal alignment. Click one of these in the Alignment group:
    • Align Left – pushes content to the left edge of the cell (default for text).
    • Center – centers content horizontally.
    • Align Right – pushes content to the right edge (default for numbers).
  4. Set vertical alignment. Click one of these (default is bottom):
    • Top Align – content sits at the top of the cell.
    • Middle Align – content is vertically centered.
    • Bottom Align – content sits at the bottom.
  5. Use the Format Cells dialog for more options. Select cells, then press Ctrl+1 (Windows) or Command+1 (Mac). Go to the Alignment tab. Here you can:
    • Set horizontal and vertical alignment from dropdowns.
    • Adjust Indent (for left/right alignment) – increase to push text inward.
    • Check Wrap text to show multiple lines within a cell.
    • Check Shrink to fit to reduce font size automatically.
    • Check Merge cells to combine selected cells into one.
    • Set Text direction (e.g., rotate text) under Orientation.
  6. Wrap text for long entries. Select cells, then in the Alignment group click Wrap Text. The row height will expand to show all lines. If it doesn’t, double-click the row boundary to auto-fit.
  7. Merge cells for headings. Select the range you want to merge (e.g., A1:D1), then click Merge & Center in the Alignment group. To unmerge, select the merged cell and click Merge & Center again. Note: merging only keeps the upper-left cell’s value; others are deleted.
  8. Rotate text. In the Alignment group, click Orientation (the slanted A icon) and choose an angle like Angle Counterclockwise. Or use the Format Cells dialog for a custom degree value.
  9. Apply alignment to an entire sheet. Click the triangle at the top-left corner (where row and column headers meet) to select all cells, then apply any alignment.
  10. Use keyboard shortcuts for horizontal alignment. Select cells and press:
    • Alt+H, A, L (Windows) – left align
    • Alt+H, A, C – center
    • Alt+H, A, R – right align
    • On Mac, use Command+Shift+L (left), Command+Shift+C (center), Command+Shift+R (right).

Common Mistakes

  • Merging cells when you don’t need to. Merging can break sorting, filtering, and formulas. Use Center Across Selection instead: select cells, open Format Cells > Alignment, and choose Center Across Selection from the Horizontal dropdown. This centers text without merging.
  • Forgetting to adjust row height after wrapping. If text is cut off, the row height may be fixed. Select the row, go to Home > Format > AutoFit Row Height.
  • Applying alignment to a single cell when you meant a range. Always select all target cells first.
  • Merging cells with data in multiple cells. Only the upper-left value survives; others are lost. Copy data elsewhere first if needed.
  • Using spaces to center text. That’s unreliable; use the alignment buttons.

Tips

  • Use Middle Align combined with Center for a clean, balanced look in headers and table titles.
  • For numbers, keep right alignment by default; it makes columns easier to compare. You can also use Increase Indent to add space from the right edge.
  • To align a single cell without affecting others, click the cell and apply alignment.
  • Use Format Painter (Home tab) to copy alignment from one cell to another: select the formatted cell, click Format Painter, then click the target cell.
  • Create custom number formats that include spaces to visually align decimal points, but that’s advanced; simple alignment is often enough.
  • For long text that spans multiple columns, use Wrap Text instead of merging, then adjust column width.

Troubleshooting

Text is cut off or overlapping into adjacent cells. If the cell to the right is empty, text appears to spill over. To fix, select the cell, enable Wrap Text, or merge the range, or simply fill the adjacent cell with content. If the row height doesn’t auto-expand, double-click the row boundary.

Alignment buttons are grayed out. This happens when the sheet is protected. Go to Review > Unprotect Sheet (enter password if prompted). If the workbook is shared, unshare it first.

Merged cells can’t be sorted or filtered properly. Unmerge the cells (select merged area, click Merge & Center) and use Center Across Selection instead.

Vertical alignment doesn’t seem to work. Ensure the row height is large enough to show the effect. Select the row, then set row height manually (Home > Format > Row Height) or auto-fit.

Orientation rotation makes text unreadable. Use a smaller angle (e.g., 45 degrees) or increase row height. You can also use Format Cells > Alignment and set a custom degree value.

Alignment changes don’t stick when you reopen the file. This can happen if the file is in compatibility mode (.xls). Save as .xlsx (File > Save As > Excel Workbook).

Frequently Asked Questions

Q: How do I center text across multiple columns without merging?
A: Select the range, open Format Cells (Ctrl+1), go to Alignment, and under Horizontal choose Center Across Selection. This centers the text across the selected cells without merging them.

Q: Can I align cells diagonally?
A: Yes. Select the cell, go to Format Cells > Alignment, and under Orientation, set a degree value (e.g., 45). Or use the Orientation button on the Home tab for preset angles.

Q: What’s the difference between wrapping text and shrinking to fit?
A: Wrap text makes the cell taller to show multiple lines. Shrink to fit reduces the font size so the text fits on one line. Both are in Format Cells > Alignment.

Q: Why do numbers default to right alignment?
A: Excel treats numbers and dates as values and right-aligns them by convention, which makes columns of numbers easier to compare. Text defaults to left. You can change this manually.

Q: How do I align all cells in a column at once?
A: Click the column header to select the entire column, then apply any alignment. Similarly, click the row header for a row.

Q: Does alignment affect formulas?
A: No. Alignment only changes appearance, not the underlying value or calculation. Formulas still work regardless of alignment.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.