If you need to create custom borders in Microsoft Excel, there are a few different ways to go about it. One option is to use the Borders and Shading tool in the Excel ribbon. This tool lets you create borders and shading effects using a variety of options, including color, thickness, and style. Another option is to use the Format Cells dialog box. This dialog box lets you customize border settings for individual cells, as well as the entire column or row. You can also specify a border width and style, as well as a background color. If you need to create custom borders for multiple columns or rows, you can use the VBA code that’s included with Microsoft Excel. This code lets you create borders using specific colors and styles, as well as different widths and heights. ..


You have plenty of options for adding cell borders in Microsoft Excel. But if you want to be a bit creative or use a border with more meaning to you, you can create and reuse a custom border in Excel.

The default border options in Excel are fine in most cases. You can use a top, bottom, left, or right cell border, surround a group of cells inside and out, and choose the thickness and style for the line.

But maybe you do a lot of data analysis and want something other than these options that you can apply quickly and without automatic conditional formatting.

Create a Custom Border Cell Style in Excel

Using Cell Styles, you can create and customize a cell border that you can reuse throughout your workbook.

To get started, open your workbook in Excel and go to the Home tab. In the Styles section of the ribbon, click “Cell Styles” and pick “New Cell Style.”

In the Style window that appears, click “Format.”

Format the Custom Border

When the Format Cells window opens, select the Border tab. On the left, pick a Style for the line and Color per your preference.

On the right, use the Presets and Border boxes to choose where and how your border will display. You can choose a border for the top, bottom, left, or right, and use diagonal lines through the center. As you click each Border box, you’ll see a preview of how your border will look.

In our example, we’ll create a red cell border with both thick and thin lines that essentially cross out the cell contents. This lets us easily eliminate certain cells as we review our data.

With the flexible options, you can combine colors, line styles and thicknesses, and different sides or the center for your border. So you have complete control over the customization of your border.

When you finish, click “OK” and you’ll return to the Style window to complete setting up your Cell Style.

Finish Setting Up the Cell Style

Enter a Style Name for the custom border. Then below, uncheck all items except for Border. If you do want to use one of the additional styles along with your custom border, simply check the box.

Next to the Border option, you’ll also see the settings you just chose for the border. Click “OK” to complete the new Cell Style custom border.

Use Your Custom Border Cell Style

When you want to use your new custom border, select a cell or cell range. Go to the Home tab and click “Cell Styles” in the ribbon. You’ll see your new style at the top under Custom. Click to apply it to the cell.

You can reuse your custom border (Cell Style) in any sheet in your workbook, making it a quick and convenient formatting option.

RELATED: How to Highlight Blanks or Errors in Microsoft Excel