You can create a cell style that includes a custom border, and then you can apply that cell style when you want to display the custom border around selected cells.

  1. On the Home tab, in the Styles group, click Cell Styles.

Tip: If you do not see the Cell Styles button, click Styles, and then click the More button next to the cell styles box.

More button in the Style gallery

  1. Click New Cell Style.

New cell style option

  1. In the Style name box, type an appropriate name for the new cell style.
  2. Click Format.
  3. On the Border tab, under Line, in the Style box, click the line style that you want to use for the border.

Format cell style

  1. In the Color box, select the color that you want to use.
  2. Under Border, click the border buttons to create the border that you want to use.
  3. Click OK.
  4. In the Style dialog box, under Style Includes (By Example), clear the check boxes for any formatting that you do not want to include in the cell style.
  5. Click OK.
  6. To apply the cell style, do the following:
    1. Select the cells that you want to format with the custom cell border.
    2. On the Home tab, in the Styles group, click Cell Styles.
    3. Click the custom cell style that you just created. Like the FancyBorderStyle button in this picture.

Cell Style gallery

Draw Cell Borders

To customize the line style or color of cell borders or erase existing borders, you can use the Draw Borders options. To draw cell borders, you'll first select the border type, then the border color and line style, and select the cells that you want to add a border around. Here's how:

  1. Click Home > the Borders arrow Borders button on the Home tab.
  2. Pick Draw Borders for outer borders or Draw Border Grid for gridlines.

Border drop down menu to pick draw border options

  1. Click the Borders arrow > Line Color arrow, and then pick a color.
  2. Click the Borders arrow > Line Style arrow, and then pick a line style.
  3. Select cells you want to draw borders around.