Home

Formatting Cells Contents

 

Cell Alignment

 

Cells Merging

When reviewing cells, we found out that a cell doesn't have dimensions of its own. Its width is imposed by its parent column and its height is set on its parent row. All of the cells we have used so far were considered individually. Microsoft Excel allows you to combine various cells in a group. This is referred to as merging cells.

To merge cells, select them and, on the Formatting toolbar, click the Merge and Center button.

Practical Learning: Merging Cells

  1. Open the DAWN Report2 workbook and click Sheet2 to make it active
  2. Select cells A3:D3
  3. On the Formatting toolbar, click the Merge and Center button Merge and Center
  4. Select cells F3:I3
  5. Press F4 to repeat the last action (otherwise, on the Formatting toolbar, click the Merge and Center button Merge and Center)
  6. Press Ctrl + Home
  7. To save the workbook, press Ctrl + S

Cells Content Alignment

We have already seen how Microsoft Excel differentiates data you enter into cells. Sometimes its default configurations will not suit your particular scenario, you should be able to control how text is aligned in cells.

Since a cell is really a rectangular box, you can completely control how text is displayed inside of it: left, right, top, bottom. As we move on, we will see various situations of aligning cells content.

Practical Learning: Control Cells Alignment

  1. Open the Cherry Pumpkin Day Care1 workbook
  2. To control the alignment of one cell, click cell F4 to make it active
  3. On Formatting toolbar, click the Align Right button Align Right
  4. To control the alignment of a group of cells, select cells E5:E15
  5. On the Formatting toolbar, click the Center button Center
  6. To control the alignment of all cells under a column, click column header C
  7. On the Formatting toolbar, click the Center button Center
  8. Press Ctrl + Home and press Ctrl + S to save the workbook
  9. Open the DAWN Report2 workbook
  10. In Sheet1, randomly select cells C6, D5, D6, H6, I5, and I6 (press and hold Ctrl while you are clicking each cell)
  11. To control the alignment of a group of randomly selected cell, on the Formatting toolbar, click the Center button Center
  12. Select cells A7:A16
  13. On the Formatting toolbar, click the Align Right button Align Right
  14. Select cell F7:F16 and press F4 to repeat the last action
  15. Save the workbook
 

Cells Content Indentation

In the previous section, we used the Center button to center the content of a cell with regards to the width of the cell. In some circumstances, you may not want to center text but you would not like to keep it left or right aligned. Indentation consists of "pushing" text to the left or the right without centering it.

To indent the contents of a cell or of a group of cells, after making the selecting, on the Formatting toolbar, you can use the Increase Indent button to "push" the contents of a cell or a group of cells to the right. The Decrease Indent button produces the same effect in the left direction.

Practical Learning: Indenting Cells Content

  1. Open the Grier Summer Camp2 workbook and, if necessary, click Sheet1
  2. Click cell C5 to make it active
  3. On the Formatting toolbar, click the Increase Indent button Increase Indent
  4. Click cell D6 and press F4 to repeat the previous action

The Alignment Property Page

Besides using the alignment buttons on the Formatting toolbar, to be more precise or to perform various actions in one step, you can use the Alignment property page of the Format Cells property sheet:

To provide the same options as the Formatting toolbar, the Alignment property page is equipped with the Horizontal combo box. Besides the left, center, and right alignments, this combo box goes further and allows text to be justified. This can be useful especially if the text is significantly long. If you select to indent text, you can use the Indent spin button to specify the number of units to indent by.

The Vertical combo box provides options not available on the Formatting toolbar. It allows you to align the contents of a cell towards the top, the middle or the bottom area of a cell.

The Text Control section provides three options: Wrap Text, Shrink To Fit, and Marge Cells.

The Orientation section allows you to "bend" text by a fix angle. There are two main ways you can set an angle. If you drag the small red diamond, you can use it to specify the desired angle. You can also click one of the arrows of the Degrees spin button.

Practical Learning: Using the Alignment Property Page

  1. Sheet1 of the Grier Summer Camp2 workbook should still be selected
    Select cells B9:C10
  2. On the main menu, click Format -> Cells...
  3. In the Format Cells dialog box, click the Alignment property page
  4. In the Text Control section, click the Merge Cells check box, and click OK
  5. Select cells E9:H9 and press F4 to repeat the previous action
  6. Select cells E8:H8
  7. Right-click the selection and click Format Cells...
  8. In the Alignment tab of the Format Cells dialog box, in the Horizontal combo box, select Center
  9. In the Vertical combo box, select Center
  10. In the Text Control section, click the Merge Cells check box
     
  11. Click OK
  12. Select cells A11:A26
  13. Press Ctrl + 1 to call the Format Cells dialog box
  14. In the Horizontal combo box, select Right
  15. In the Text Control section, click the Merge Cells check box
  16. In the Orientation section, click and hold the mouse on the small red diamond. Then drag it up until the spin button in the same section displays 90
     
  17. Click OK

Cells Borders

 

Introduction

The alignment we have used so far is applied to the contents of a cell or of a group of selected cells. As we have mentioned already, a cell appears and behaves like a rectangular box. As such, it has borders and a background. Microsoft Excel provides a default appearance for a cell with regards to its background. For example, it surrounds the cell with a gray border and a white background. You can keep these defaults or you can change them as you see fit.

Once again, to format a cell, you can use the Formatting toolbar. It is equipped with the Borders button. To change the borders of a cell or a group of cells, first select it. If the Borders button already displays the type of border you want, you can just click it. Otherwise, to select a type of border, you can click the arrow of the Borders button. It would display a window with preset borders:

To help with recognizing  borders, each button displays it own tool tip. To find it out, you can position the mouse on a button for a few seconds. From now on, we will refer to each button or border by its tool tip.

Once you see a border you like, you can click it. After clicking a preset, the Borders window closes and the button becomes as it was before. The clicked border would become the default selection on the Borders button. If you are doing a lot of borders formatting, you can click the arrow of the Borders button to display its window. Then, on the Borders window, you can drag its blue bar away from the toolbar. This would keep the Borders window permanently opened. Once you don't need it anymore, you can close it as you would close any window.

Practical Learning: Adding Borders to Cells

  1. The Grier Summer Camp2 workbook should still be opened with the Sheet1 selected
    Select cells B2:J2
  2. On the Formatting toolbar, click the arrow of the Borders button and click the Top And Double Bottom Border button (3rd column - 2nd row)
  3. Select cells F6 and G6
  4. On the Formatting toolbar, click the arrow of the Borders button and click the Bottom Border button
     
  5. Randomly select cells F5:G6 and I29. Press F4 to repeat the previous action
  6. Select cells I6:J6
  7. On the Formatting toolbar, click the arrow of the Borders button and click the Top And Bottom Border button
  8. Select cells A9:A27
  9. On the Formatting toolbar, click the arrow of the Borders button and click the Right Border button
  10. To see the result, on the main menu, click Tools -> Options
  11. In the Window Options section, remove the check mark on the Gridlines control and click OK
     
  12. Save the workbook
  13. Open the DAWN Report2 workbook
  14. Click cell A3 to give it focus.
  15. On the Formatting toolbar, click the arrow of the Borders button. Click the Bottom Border (second column, first row)
     
  16. Click cell F3 and press F4 to repeat the last action
  17. Select cells A6:I6
  18. Since the bottom border is already selected on the Borders button, on the Formatting toolbar, just click the Borders button
  19. Save the workbook

The Border Property Page

You may realize soon that, despite its list of patterns, the Borders button of the Formatting toolbar has some limitations. Normally, it was created to provide the most regularly applied borders. To apply more options, the Format Cells dialog box provides the Border property page:

 

Practical Learning: Using the Border Property Page

  1. The DAWN Report2 workbook should still be opened
    Select cells A17:I17
  2. Right-click on the selected cells and click Format Cells...
  3. From the Format Cells dialog box, click the Border property page
  4. From the Line section, in the Style list box, click the 5th line in the right section of the list
  5. Click the Color combo box and select Brown
  6. From the Presets section, click the bottom border button
     
  7. Click OK.
  8. Select cells A2:I2.
  9. On the main menu, click Format -> Cells...
  10. You should be in the Border property page (because Microsoft Excel remembers the last tab you used). From the Line section, in the Style list box, click the 6th line on the right section of the list.
  11. Click the Color combo box and select Light Blue. From the Border section, click the top border button.
  12. Click the Color combo box and select Indigo. From the Border section, click the bottom border
     
  13. Still in the Format Cells dialog box, click the Patterns property page
  14. In the Color: section, click the Pale Blue color (6th column, 5th row in the list).
  15. Click OK
  16. On the main menu, click Tools -> Options... From the Tools dialog box, click the View property page
  17. In the Window Options section, remove the check mark on the Gridlines check box, and click OK
  18. Press Ctrl + Home. That will give you a better view of the work done
  19. Save the workbook.

The Cell's Background

 

Introduction

The cell background is the color or pattern that fills its inside. The default background of a cell is white. There are various options available to you if you want to change it.

Once again, the Formatting toolbar provides the quickest means of configuring a cell or a group of cells. To paint a cell or a group with a color other than white, after selecting it, you can click the arrow of the Fill Color button.

The Pattern Property Page

As we have seen so far, the Format Cells dialog box provides an extensive array of options for cell configuration. It is equipped with the Patterns property page that displays a wide range of colors:

To change a cell background, use one of the colors on the Cell Shading section of the Patterns tab. It offers a list of colors you can use to configure a cellís background by changing the Cell Shading.

 

Previous Copyright © 2002-2007 FunctionX, Inc. Next