• No results found

Aligning data in Excel 2010

In document Cognizant E-learning Modules (Page 149-154)

Learning Objective

After completing this topic, you should be able to

recognize how alignment commands change the position of text 1. Alignment of data

Excel 2010 aligns data differently within worksheet cells depending on whether it's text, times, dates, or numbers. In some cases though, you may want to change the default way data is positioned. Depending on the type of the data, you can choose from several alignment options.

For instance, you can indent text or, if text is too long to display fully in a cell, you can set it to wrap to a new line within that cell.

Graphic

In a worksheet detailing various expenses of salespeople, one column of data contains text items indented in different ways. These items are selected and indented uniformly. In a row containing the names of salespeople, the full names aren't visible in the cell because the text is too long to display fully. Wrapping the text positions the names and surnames of the salespeople on separate lines in the cells.

You can convert two or more adjacent cells into one, larger cell so that text like a heading will fit in the cell. You can also use an alignment option to change the orientation of text – so that it displays vertically instead of horizontally, for example.

Graphic

In the same worksheet, four separate cells in a header row are selected and merged. The data contained in one of the original cells now displays in the center of the merged cell. In addition,the orientation of text in a narrow column is changed from horizontal to vertical, so that all the text is visible.

You can control and adjust the alignment of data in an Excel 2010 worksheet using the commands in the Alignment group on the Home tab of the Ribbon.

Graphic

The Sales Seattle December worksheet is open in Excel.The Excel interface includes several default elements – a mini toolbar of frequently used commands, a Ribbon containing several tabs such as Home, Insert, and Page Layout, and a formula bar. The spreadsheet appears below these elements.

149

The commands in the Alignment group are divided into three sections.

Graphic

Other groups on the Home tab include Clipboard and Font.

Select each section of the Alignment group to find out more about it.

First section

You can use the six buttons in the first section in the Alignment group to change the alignment of entries in relation to the left or right, top or bottom, borders of their cells.

Second section

You use the three buttons in the second section of the Alignment group to control the orientation and indentation of data in selected cells.

Third section

The two buttons in the third section of the Alignment group let you control the positioning of data within selected cells.

The first section of the Alignment group is made up of two rows, each containing three buttons.

You use these to alter the horizontal alignment of entries in selected cells in different ways.

The first row of buttons lets you change the vertical alignment of the data in selected cells. The Top Align button moves and positions data within a cell against the top border of that cell, without changing its default alignment to the right or the left.

The Middle Align button moves and positions data in a cell to the center point between the cell's top and bottom borders, without changing its default alignment to the right or the left.

The last button in the first row is the Bottom Align button. This lets you move data in a cell against the bottom border of the cell, without changing its default alignment to the right or the left.

You can use the second row of buttons in the first section of the Alignment group to control the horizontal alignment of data entries in selected cells.

The Align Text Left button moves the entry in a cell against the left border of the cell, without changing its position in relation to the cell's top and bottom borders.

The Center button adjusts data so that it's centered between the left and right borders of a cell.

The last button in this row is the Align Text Right button.

You can use this button to move data against the right border of a cell, without changing its position in relation to the cell's top and bottom borders.

150

The three buttons that make up the second section in the Alignment group are the Orientation, Decrease Indent, and Increase Indent buttons.

Select each button for more information about it.

Orientation

You can use the Orientation button to access options for changing the orientation of data in selected cells. For instance, you can choose to display entries vertically instead of horizontally, or at another angle you'd like.

Just be aware that if you've already adjusted any of the cell dimensions in a worksheet, entries you decide to display at an angle may run into adjacent cells. You can correct this by widening the affected row or column of data.

Decrease Indent

Indentation is useful when you want to set certain cell entries apart from others. It alters the margin between data and either the left or right border of a cell, depending on the side to which the data is aligned.

The Decrease Indent button decreases the margin between an entry in a cell and the border of that cell. If text is centered or left aligned, clicking the button reduces the margin between an entry and the left border while, if an entry is aligned to the right, it decreases the default margin between the entry and the cell's right border.

Increase Indent

The Increase Indent button is similar to the Decrease Indent button, but is used to increase the margin between the entry in a specific cell and the border of the cell.

For instance, if text is centered or left aligned, clicking the button will indent the text further to the right while, if an entry is aligned to the right, clicking the button increases the default margin between the entry and the cell's right border.

Sometimes the data in a cell doesn't display fully in a cell because it's too long to fit into the cell.

Graphic

For example the full name Bruce Oprisan doesn't display fully in the selected cell.

When this happens, you can make use of either of the two buttons on the right of the Alignment group – the Wrap Text button and the Merge & Center button.

Select each button for more information about what it does.

Wrap Text

151

The Wrap Text button wraps data in a cell onto a new line if it's too long to fit on a single line, given the existing width of the cell. The height of the cell automatically adjusts to accommodate more than one line of text, unless the lines fit given its existing height.

Clicking this button puts Bruce on one line and Oprisan on the next line in the same cell.

Merge & Center

The Merge & Center button combines two or more selected, adjacent cells to create a single, larger cell. Only the entry in the top, leftmost cell is retained in the larger cell, and this entry is aligned to the center.

The text Salesperson is now in the center of four merged cells.

Try It

Now you practice using alignment options to change the alignment of the text in cells E8 and C9.

Cell E8 is already selected.

In an Excel spreadsheet, the name Bruce Oprisan doesn't fit into cell E8. The row heading Sales item is vertically aligned, and is read from top to bottom.

To complete the task

1. Click the Wrap Text button and then click the Align Text Left button 2. Click the Increase Indent button

3. Select cell C9 and select Rotate Text Up from the Orientation drop-down menu to make the text in the cell face the other way

The Orientation drop-down menu options are Angle Counterclockwise, Angle Clockwise, Vertical Text, Rotate Text Up, Rotate Text Down, and Format Cell Alignment.

You've changed the alignment of text in cells.

You can access additional options for aligning data by clicking the Alignment launcher.

Graphic

The Alignment launcher is available from the Alignment group of the Home tab on the Ribbon.

This opens the Format Cells dialog box on the Alignment tabbed page. This page includes many of the same options as the Alignment group, as well as options for shrinking text to fit a cell and for changing the direction of the text.

Graphic

The Alignment tabbed page includes a Text alignment section with Horizontal and Vertical drop-down list boxes and an Indent spin box. It includes a Text control section with Wrap text, Shrink to fit, and Merge cells checkboxes. There are also Orientation and Right-to-left sections.

152

It also lets you specify the exact angle at which to orient data within selected cells.

Graphic

There is a Text direction drop-down list box in the Right-to-left section and an Orientation pane with a Degrees spin box in the Orientation section.

Question

Match the command from the Alignment group with the graphic depicting the way it changes text positioning.

Options:

A. Align Center B. Merge & Center C. Wrap Text D. Middle Align

Targets:

1. t6_158_sg.png 2. t6_159_sg.png 3. t6_160_sg.png 4. t6_161_sg.png

Answer

The Align Center button aligns data in a cell so that it's centered between the left and right borders of the cell.

The Merge & Center button combines two or more adjacent cells to create a single, larger cell when text is too long.

The Wrap Text button adds a line break to text if it's too long and has reached the right border of a cell.

The Middle Align button moves data in a cell to the center point between the cell's top and bottom borders.

Correct answer(s):

Target 1 = Option A

153

In document Cognizant E-learning Modules (Page 149-154)