Excel XP: Text and Cell Alignments

Lesson 12: Text and Cell Alignments

/en/excelxp/inserting-and-deleting-cells/content/

Introduction

By the end of this lesson, you should be able to:

  • Change horizontal cell alignment
  • Change vertical cell alignment
  • Change text control
  • Change text orientation

Using the Standard toolbar to align text and numbers in cells

You've probably noticed by now that Excel XP left-aligns text (labels) and right-aligns numbers (values). This makes data easier to read.

Default Alignment for Text and Numbers

You do not have to leave the defaults. Text and numbers can be defined as left-aligned, right-aligned, or centered in Excel XP. The picture below shows the difference between these alignment types when they're applied to labels.

Text Alignment

Text and numbers may be aligned using the left-align, center, and right-align buttons on the Formatting toolbar:

Alignment Buttons on the Toolbar

To align text or numbers in a cell:

  • Select a cell or range of cells.
  • Click either the Left-Align, Center, or Right-Align buttons on the Standard toolbar.
  • The text or numbers in the cell(s) take on the selected alignment treatment.

Changing horizontal cell alignment

We've previously seen how to align text or numbers using the left-align, center, and right-align buttons on the Standard toolbar. You can also define alignment in the Alignment tab of the Format Cells dialog box.

Horizontal Alignment Examples

The Horizontal section features a drop-down menu that contains the same left, center, and right alignment options in the picture above, as well as several more:

Fill

This fills the cell with the current contents by repeating the contents for the width of the cell.

Justify

If the text is larger than the cell width, Justify wraps the text in the cell and adjusts the spacing within each line so all lines are as wide as the cell.

Center Across Selection

Contents of the cell that are farthest to the left are centered across the selection of cells. This is similar to the Merge and Center command, except the cells are not merged.

To change horizontal alignment using the Format Cells dialog box:

  • Select a cell or range of cells.
  • Choose Format > Cells from the menu bar.

    Formal and Cells Menu Selections

    (You could also right-click and choose Format Cells from the shortcut menu.)
  • The Format Cells dialog box opens.
  • Click the Alignment tab.

    Alignment Tab on the Format Cells Dialog Box
  • Click the Horizontal drop-down menu and select a horizontal alignment treatment.
  • Click OK to apply the horizontal alignment to the selected cell(s).

Changing vertical cell alignment

You can also define vertical alignment in a cell, similar to how it is done for horizontal alignment. In vertical alignment, information in a cell can be located at the top of the cell, middle of the cell, or bottom of the cell. The default is bottom.

Vertical Alignment Examples

To change vertical alignment using the Format Cells dialog box:

  • Select a cell or range of cells.
  • Choose Format > Cells from the menu bar.

    (You could also right-click and choose Format Cells from the shortcut menu.)
  • The Format Cells dialog box opens.
  • Click the Alignment tab.
  • Click the Vertical drop-down menu and select a vertical alignment treatment.
  • Click OK to apply the vertical alignment to the selected cell(s).

Changing text control

Text control allows you to control the way Excel XP presents information in a cell. There are three types of text control: wrapped text, shrink to fit, and merge cells.

Examples of Text Control Alignments
  • The wrapped text feature wraps the contents of a cell across several lines if it's too large than the column width. It also increases the height of the cell.
  • The shrink-to-fit feature shrinks the text so it fits into the cell; the more text in the cell, the smaller it will appear in the cell.
  • The merge cells feature can also be applied by using the Merge button Merge and Center button on the Standard toolbar.

To change text control using the Format Cells dialog box:

  • Select a cell or range of cells.
  • Choose Format > Cells from the menu bar.
  • The Format Cells dialog box opens.
  • Click the Alignment tab.
  • Click the Wrapped Text, Shrink-to-Fit, or Merge Cells check boxes—or any combination of them—as needed.
  • Click OK.

Changing text orientation

The fourth type of cell alignment in the Format Cells dialog box is text orientation, which allows text to be oriented 90 degrees in either direction up or down.

Text Orientation Alignment Examples

To change text orientation using the Format Cells dialog box:

  • Select a cell or cell range to be subject to text control alignment.
  • Choose Format > Cells from the menu bar.
  • The Format Cells dialog box opens.
  • Click the Alignment tab.
  • Increase or decrease the number shown in the Degrees field or spin box.
  • Click OK.

Challenge!

  • Type any text you want in cell B2.
  • Change the row height of row 2 to 30.
  • Change the column width of column B to 20.
  • Apply a horizontal text alignment.
  • Apply a vertical text alignment.
  • Apply a text orientation of 90 degrees.

/en/excelxp/formatting-numbers/content/