Adding Borders to Cells and Ranges

One way to improve the appearance of a worksheet is to add borders to the data on the worksheet. You can add boxes around cells and ranges, add emphasis lines anywhere on the worksheet, and change the thickness and color of the border lines.

As you work with your worksheet onscreen, each cell is identified by a gridline that surrounds the cell. In print, these gridlines might appear washed out. To have better defined lines appear on the printout, you can add borders to selected cells or cell ranges.

You can frame selected cells with a border to make your data stand out. Highlight parts of a table to emphasize the content by placing a thick border around the specific cells you want to attract attention to. Select the cells you want to use and then apply the border.

Adding a border to a title, title and subtitle, total row, and total column are just some ways you can use borders. More specifically, you can have a single, thick, outline border that creates a box around a title for the worksheet. Or, you can add a double underline on the bottom of cells to call attention to the totals.

Applying a Border

The Borders feature lets you manipulate the placement of the borders, the thickness of the lines, and color for any border lines. You can make borders a little more interesting by changing the thickness and color of specific border lines. You can have a different thickness and a different color for each border, or any combination of thickness and color.

By combining border options, you get various results. Try combining border options with row-height and column-width options to get different effects. Experiment on your worksheets for best results.

Applying a border is a cinch; it's making the decisions about the elements of the border that's difficult. The standard borders that Excel offers work just fine, but if you want to get creative, just click away on the Borders tab in the Format Cells dialog box until you get the border you want.

In the next exercise, you add a single-line top border and double-line bottom border to the totals in row 9 in the Summary sheet in the Sales 1st Qtr workbook.

To Do: Add a Border
  1. Select the cells that will be surrounded by a border; in this case, select B9:D9.

  2. Click the Format menu and choose Cells. The Format Cells dialog box opens.

  3. Click the Border tab. The Border options jump up front, as shown in Figure 10.3.

    Figure 10.3. Border options in the Format Cells dialog box.

    graphics/10fig03.jpg

    graphics/lightbulb_icon.gif

    A fast way to add a border is to click the Borders button on the Formatting toolbar and choose the type of border you want from the Borders palette.


    graphics/lightbulb_icon.gif

    You can add borders to your worksheet by using the shortcut menu; select the cell, click the right mouse button on the cell to display the shortcut menu, and then choose Format Cells.


  4. Click the top of the Border preview diagram to add a top single-line border.

  5. Click the double-underline line style.

  6. Click the bottom of the Border preview diagram to add a bottom double-line border.

  7. Click OK. Excel should apply a single-line top border and double-line bottom border to the selected cells.

    graphics/lightbulb_icon.gif

    The outline border still can be hard to see because the gridlines are displayed onscreen. If you want to turn off the gridlines, choose Tools, Options and then click the View tab. In the Window Options section, choose Gridlines and click OK.


  8. Click any cell to deselect the range. Figure 10.4 shows the border on the Summary sheet.

    Figure 10.4. A border applied to a range of cells.

    graphics/10fig04.jpg

  9. Using Figure 10.4 as a guide, enter the rest of the numbers in column D. Format the numbers in column D to match the number formats in columns B and C.

  10. Move the date in cell A12 to cell E1. Make row 1 taller, if necessary.

graphics/lightbulb_icon.gif

To remove a border, select the cells that contain the border, click the Borders down arrow on the Formatting toolbar, and choose No Border.


Using the Toolbar to Apply a Border

When you're in a hurry to add borders, you can use the Borders button on the Formatting toolbar to apply a border. First, select the cells around which you want the border to appear. Then click the down arrow to the right of the Borders button on the Formatting toolbar. A palette of border choices appears, as illustrated in Figure 10.5. Click the desired border.

Figure 10.5. Borders palette.

graphics/10fig05.jpg

graphics/bookpencil_icon.gif

If you click the Borders button itself (rather than on the arrow), Excel automatically adds a bottom border or the border you last chose to the selected cells.


Adding Borders with the Draw Border Tools

You can draw borders exactly where you want them with the Draw Border feature. This feature enables you to draw a border using the mouse. The Draw Border tools are on a separate toolbar, called the Borders toolbar. To display the Borders toolbar, click the down arrow to the right of the Borders button on the Formatting toolbar. Then click Draw Borders. The Borders toolbar appears, as shown in Figure 10.6.

Figure 10.6. The Borders toolbar.

graphics/10fig06.jpg

To draw a border on any side of a cell, click the down arrow to the right of the Draw Border button on the Borders toolbar. Choose Draw Border. The mouse pointer looks like a pencil. You can create borders by clicking the left mouse button and dragging the pen along any side of any cell.

graphics/lightbulb_icon.gif

If you want to change the line style, click the Line Style down arrow on the Borders toolbar and select a line style. If you want to change the line color, click the Line Color button on the Borders toolbar and select a color from the palette.


To draw border grids anywhere on the worksheet, click the down arrow to the right of the Draw Border button on the Borders toolbar. Choose Draw Border Grid. The mouse pointer looks like a pencil with a grid next to it. You can create border grids by clicking in any cell and dragging it across the cells where you want a border grid to appear.

graphics/bookpencil_icon.gif

To erase a border, click the Erase Border button on the Borders toolbar. The mouse pointer looks like a rubber eraser. Drag the eraser over the cells that contain borders you want to remove. Excel removes the borders.




    Part I: Excel Basics
     
    ASPTreeView.com
     
    Evaluation has іМЦАЕЧЗexpired.
    Info...