| | Help by Product How-to Resources Support and Feedback Technical Resources Additional Resources Get Office 2007 | Warning: You are viewing this page with an unsupported Web browser. This Web site works best with Microsoft Internet Explorer 6.0 or later, Firefox 1.5, or Netscape Navigator 8.0 or later. Learn more about supported browsers.
Apply or remove cell borders on a worksheet
Using predefined border styles, you can quickly add a border around cells or ranges (range: Two or more cells on a sheet. The cells in a range can be adjacent or nonadjacent.) of cells.
- On a worksheet, select the cell or range of cells that you want to add a border to, change the border style on, or remove a border from.
How to select a cell or a range
| To select |
Do this |
| A single cell |
Click the cell, or press the arrow keys to move to the cell. |
| A range (range: Two or more cells on a sheet. The cells in a range can be adjacent or nonadjacent.) of cells |
Click the first cell in the range, and then drag to the last cell, or hold down SHIFT while you press the arrow keys to extend the selection. You can also select the first cell in the range, and then press F8 to extend the selection by using the arrow keys. |
| A large range of cells |
Click the first cell in the range, and then hold down SHIFT while you click the last cell in the range. You can scroll to make the last cell visible. |
| All cells on a worksheet |
Click the Select All button.

To select the entire worksheet, you can also press CTRL+A. Note If the worksheet contains data, CTRL+A selects the current region. Pressing CTRL+A a second time selects the entire worksheet.
|
| Nonadjacent cells or cell ranges |
Select the first cell or range of cells, and then hold down CTRL while you select the other cells or ranges. You can also select the first cell or range of cells, and then press SHIFT+F8 to add another nonadjacent cell or range to the selection. Note You cannot cancel the selection of a cell or range of cells in a nonadjacent selection without canceling the entire selection. |
| An entire row or column |
Click the row or column heading.
Row heading
Column heading
You can also select cells in a row or column by selecting the first cell and then pressing CTRL+SHIFT+ARROW KEY (RIGHT ARROW or LEFT ARROW for rows, UP ARROW or DOWN ARROW for columns). Note If the row or column contains data, CTRL+SHIFT+ARROW KEY selects the row or column to the last used cell. Pressing CTRL+SHIFT+ARROW KEY a second time selects the entire row or column.
|
| Adjacent rows or columns |
Drag across the row or column headings. Or select the first row or column; then hold down SHIFT while you select the last row or column. |
| Nonadjacent rows or columns |
Click the column or row heading of the first row or column in your selection; then hold down CTRL while you click the column or row headings of other rows or columns that you want to add to the selection. |
| More or fewer cells than the active selection |
Hold down SHIFT while you click the last cell that you want to include in the new selection. The rectangular range between the active cell (active cell: The selected cell in which data is entered when you begin typing. Only one cell is active at a time. The active cell is bounded by a heavy border.) and the cell that you click becomes the new selection. |
Note To cancel a selection of cells, click any cell on the worksheet.
- To apply a new or different border style, click the arrow next to Borders
on the Formatting toolbar, and then choose a border style from the palette.Tip To apply a custom border style or a diagonal border, click Cells on the Format menu. On the Border tab, click the line style and color that you want, and then click one or more buttons to indicate the border placement. Two diagonal border buttons are available under Border.
- To remove cell borders, click the arrow next to Borders
on the Formatting toolbar, and then click No Border on the palette. Notes - If you click the Borders
button
(not the arrow), the most recently used border style is applied. - If you apply borders to a selected cell, the border is also applied to adjacent cells that share a bordered cell boundary. For example, if you apply a box border to enclose the range B1:C5, the cells D1:D5 acquire a left border.
- If you apply two different types of borders to a shared cell boundary, the most recently applied border is displayed.
- A selected range of cells is formatted as a single block of cells. If you apply a right border to the range of cells B1:C5, the border is displayed only on the right edge of the cells C1:C5.
- If you want to print the same border on cells that are separated by a page break, but the border appears on only one page, apply an inside border. For example, suppose you want to print a border at the bottom of the last row of one page and to use the same border at the top of the first row on the next page. Select the rows on both sides of the page break, and then click Cells on the Format menu. Click the Border tab, and under Presets, click the Inside button
. Then, under Border, in the preview diagram, remove the vertical border by clicking it.
|