Equivalent to clicking the Border tab in the Format Cells dialog box, which appears when you click the Cells command on the Format menu. Adds a border to the selected cell or range of cells.
Syntax
BORDER(outline, left, right, top, bottom, shade, outline_color, left_color, right_color, top_color, bottom_color)
BORDER?(outline, left, right, top, bottom, shade, outline_color, left_color, right_color, top_color, bottom_color)
Outline, left, right, top, and bottom are numbers from 0 to 7 corresponding to the line styles in the Border dialog box, as shown in the following table.
Argument | Line type |
0 | No border |
1 | Thin line |
2 | Medium line |
3 | Dashed line |
4 | Dotted line |
5 | Thick line |
6 | Double line |
7 | Hairline |
Note For compatibility with earlier versions of Microsoft Excel, TRUE and FALSE values for the above arguments create a thin border or no border, respectively.
Shade corresponds to the Shade check box in the Border dialog box of Microsoft Excel version 4.0. This argument is included for compatibility only.
Outline_color, left_color, right_color, top_color, and bottom_color are numbers from 1 to 56 corresponding to the Color box in the Border dialog box. Zero corresponds to automatic color.
Return to index