Aligning the data in cells By default, Excel aligns text entries on the left margin of the cell...

12
Aligning the data in cells By default, Excel aligns text entries on the left margin of the cell (left justification) and aligns numeric entries on the right margin of the cell (right justification). While these are commonly used cell alignments, Excel supports a wider array of cell alignments: horizontal alignment (left, right, and centered), vertical alignment (top, bottom, and center of cell), centering a label spanning several cells, rotated text, and word-wrapping text in cells Cell alignments can be set with tool buttons and the Format Cells dialog box, accessed by the Format Cells menu command and Format Cells popup command. Aligning the data in cells, Slide 1 Copyright © 2004, Jim Schwab, University of Texas at Austin

Transcript of Aligning the data in cells By default, Excel aligns text entries on the left margin of the cell...

Page 1: Aligning the data in cells By default, Excel aligns text entries on the left margin of the cell (left justification) and aligns numeric entries on the.

Aligning the data in cells

By default, Excel aligns text entries on the left margin of the cell (left justification) and aligns numeric entries on the right margin of the cell (right justification).

While these are commonly used cell alignments, Excel supports a wider array of cell alignments: horizontal alignment (left, right, and centered), vertical alignment (top, bottom, and center of cell), centering a label spanning several cells, rotated text, and word-wrapping text in cells

Cell alignments can be set with tool buttons and the Format Cells dialog box, accessed by the Format Cells menu command and Format Cells popup command.

Aligning the data in cells, Slide 1 Copyright © 2004, Jim Schwab, University of Texas at Austin

Page 2: Aligning the data in cells By default, Excel aligns text entries on the left margin of the cell (left justification) and aligns numeric entries on the.

The cell alignment tool buttons

The Formatting tool bar contains three tool buttons for aligning cell contents (left, center, and right) and one tool button for merging cells and centering text across the merged cells.

The Formatting tool bar contains three tool buttons for aligning cell contents (left, center, and right) and one tool button for merging cells and centering text across the merged cells.By default, Excel left justifies

the word Name in cell A1 because it is text.

The left justification button is not highlighted because this was not set by the user.

By default, Excel left justifies the word Name in cell A1 because it is text.

The left justification button is not highlighted because this was not set by the user.

Aligning the data in cells, Slide 2 Copyright © 2004, Jim Schwab, University of Texas at Austin

Page 3: Aligning the data in cells By default, Excel aligns text entries on the left margin of the cell (left justification) and aligns numeric entries on the.

Centering text in a cell

The text Name in cell A1 is left-justified by Excel's default cell alignment for text.

The text Name in cell A1 is left-justified by Excel's default cell alignment for text.

To change the alignment to centered within the cell, click on the Center tool button on the Formatting tool bar.

To change the alignment to centered within the cell, click on the Center tool button on the Formatting tool bar.

Excel centers the word Name in cell A1.

Excel centers the word Name in cell A1.

The Center alignment tool button is highlighted to reflect the formatting of the active cell.

The Center alignment tool button is highlighted to reflect the formatting of the active cell.

Aligning the data in cells, Slide 3 Copyright © 2004, Jim Schwab, University of Texas at Austin

Page 4: Aligning the data in cells By default, Excel aligns text entries on the left margin of the cell (left justification) and aligns numeric entries on the.

Right justifying text in a cell

The word Name is centered in cell A1, indicated by both the cell contents and the highlighted Center button.

The word Name is centered in cell A1, indicated by both the cell contents and the highlighted Center button.

To change the alignment from centered to right justified, click on the Align Right tool button on the Formatting tool bar.

To change the alignment from centered to right justified, click on the Align Right tool button on the Formatting tool bar.

Excel right-justifies the word Name in the cell.

Excel right-justifies the word Name in the cell.

Note: unlike font styles which are cumulative, alignments are exclusive and only one can be applied at a time. If a second one is selected, the first one is turned off and the second one applied.

Note: unlike font styles which are cumulative, alignments are exclusive and only one can be applied at a time. If a second one is selected, the first one is turned off and the second one applied.

Aligning the data in cells, Slide 4 Copyright © 2004, Jim Schwab, University of Texas at Austin

Page 5: Aligning the data in cells By default, Excel aligns text entries on the left margin of the cell (left justification) and aligns numeric entries on the.

Restoring default text alignment

The tool buttons for justifying text are toggle buttons. If we click a second time on the Align Right tool button, the right justification will be removed and the text will return to its default left justification.

The tool buttons for justifying text are toggle buttons. If we click a second time on the Align Right tool button, the right justification will be removed and the text will return to its default left justification.

All cell alignments have been removed and the text returns to its default justification.

All cell alignments have been removed and the text returns to its default justification.

Note: if we had left-justified the text with the Align Left command, the Align Left tool button would be highlighted. Since it is not, we know that Excel is using its default justification.

Note: if we had left-justified the text with the Align Left command, the Align Left tool button would be highlighted. Since it is not, we know that Excel is using its default justification.

Aligning the data in cells, Slide 5 Copyright © 2004, Jim Schwab, University of Texas at Austin

Page 6: Aligning the data in cells By default, Excel aligns text entries on the left margin of the cell (left justification) and aligns numeric entries on the.

Centering text across several cells

The Merge and Center tool is useful for a table with a heading row above a row of subheadings, and we want the heading centered over the subheadings.

The Merge and Center tool is useful for a table with a heading row above a row of subheadings, and we want the heading centered over the subheadings.

First, select the cells in which the heading is to be centered, A1 to A3.

First, select the cells in which the heading is to be centered, A1 to A3.

Second, click on the Merge and Center tool button on the Formatting tool bar.

Second, click on the Merge and Center tool button on the Formatting tool bar.

Excel merges the three cells so that they act like one cell. The vertical cell boundaries between A1 and B1 and B1 and C1 are removed.

Excel merges the three cells so that they act like one cell. The vertical cell boundaries between A1 and B1 and B1 and C1 are removed.

The text is centered in the merged cell. Excel highlights both the Merge and Center button and the Center button.

The text is centered in the merged cell. Excel highlights both the Merge and Center button and the Center button.

Aligning the data in cells, Slide 6 Copyright © 2004, Jim Schwab, University of Texas at Austin

Page 7: Aligning the data in cells By default, Excel aligns text entries on the left margin of the cell (left justification) and aligns numeric entries on the.

The format cells menu command

Cell alignments can also be set by using the Format Cells dialog box.

To open the Format Cells dialog box, select Cells from the Format menu bar.

Cell alignments can also be set by using the Format Cells dialog box.

To open the Format Cells dialog box, select Cells from the Format menu bar.

Aligning the data in cells, Slide 7 Copyright © 2004, Jim Schwab, University of Texas at Austin

Page 8: Aligning the data in cells By default, Excel aligns text entries on the left margin of the cell (left justification) and aligns numeric entries on the.

The format cells dialog box

When the Format Cells dialog box opens, click on the Alignment tab to go to the options for cell alignment.

When the Format Cells dialog box opens, click on the Alignment tab to go to the options for cell alignment.

In this dialog, there are commands for setting the horizontal and vertical alignment of the contents of cells.

In this dialog, there are commands for setting the horizontal and vertical alignment of the contents of cells.

The Orientation panel supports changing text to print as a column instead of as a line, and commands to rotate the text so that it displays at an angle.

The Orientation panel supports changing text to print as a column instead of as a line, and commands to rotate the text so that it displays at an angle.

Were we using a language where text was printed from right to left, we could enable this behavior in the worksheet.

Were we using a language where text was printed from right to left, we could enable this behavior in the worksheet.

We can have text word-wrap in cells, shrink down to fit, and we can merge cells.

We can have text word-wrap in cells, shrink down to fit, and we can merge cells.

Aligning the data in cells, Slide 8 Copyright © 2004, Jim Schwab, University of Texas at Austin

Page 9: Aligning the data in cells By default, Excel aligns text entries on the left margin of the cell (left justification) and aligns numeric entries on the.

Options for aligning text

Aligning the data in cells, Slide 9 Copyright © 2004, Jim Schwab, University of Texas at Austin

Click on the down arrow for the drop down list of horizontal alignments.

Click on the down arrow for the drop down list of horizontal alignments.

The Center Across Selection option works just like the Merge and Center tool button.

The Center Across Selection option works just like the Merge and Center tool button.

We can include an indent for left and right justify, which will move the text from the left or right by the number of units specified in the Indent numeric spinner.

We can include an indent for left and right justify, which will move the text from the left or right by the number of units specified in the Indent numeric spinner.

On the Horizontal alignment drop down list, there are commands to left, center, and right justify cell contents.

On the Horizontal alignment drop down list, there are commands to left, center, and right justify cell contents.

Page 10: Aligning the data in cells By default, Excel aligns text entries on the left margin of the cell (left justification) and aligns numeric entries on the.

Word wrapping text - 1When the text in a cell is too long to be displayed, one of our options is to wrap the text across multiple lines.

When the text in a cell is too long to be displayed, one of our options is to wrap the text across multiple lines. Select the Cells

from Format menu to open the Format Cells dialog box.

Select the Cells from Format menu to open the Format Cells dialog box.

Aligning the data in cells, Slide 10 Copyright © 2004, Jim Schwab, University of Texas at Austin

Page 11: Aligning the data in cells By default, Excel aligns text entries on the left margin of the cell (left justification) and aligns numeric entries on the.

Word wrapping text - 2

First, click on the Alignment tab, if necessary.

First, click on the Alignment tab, if necessary.

Second, mark the check box Wrap text.

Second, mark the check box Wrap text.

Third, click on the OK button to wrap the text in the selected cell.

Third, click on the OK button to wrap the text in the selected cell.

Aligning the data in cells, Slide 11 Copyright © 2004, Jim Schwab, University of Texas at Austin

Page 12: Aligning the data in cells By default, Excel aligns text entries on the left margin of the cell (left justification) and aligns numeric entries on the.

The cell containing the wrapped text

Excel wrapped the text in cell A1 and increased the height of row 1 so that all of the text would be visible.

Excel wrapped the text in cell A1 and increased the height of row 1 so that all of the text would be visible.

Aligning the data in cells, Slide 12 Copyright © 2004, Jim Schwab, University of Texas at Austin