30 Advanced Excel Tips for 2026

Excel Champs / Excel Basics / How to Change Border Color in Excel
By Puneet Gogia (Microsoft MVP)

How to Change Border Color in Excel

30+ Advanced Excel Tips for 2026

No spam. Only Excel Stuff. God Promise. 😊

Select the cells, press Ctrl + 1 and open the Border tab. Pick a colour from the Color drop-down first, then click Outline and Inside (or individual edges in the preview), and click OK.

From the ribbon, open the Home → Borders drop-down, choose Line Color and pick a colour. The pointer turns into a pencil you can drag along cell edges. For a whole range, press Esc to drop the pencil, select the range and choose All Borders or Outside Borders from the same drop-down. They use the new colour.

The colour only reaches lines you apply after choosing it. If you click Outline before picking the colour, the borders stay black. Existing borders keep their old colour until you reapply or draw over them.

The light grey lines on a new sheet are gridlines, not borders. Recolour them under File → Options → Advanced → Display options for this worksheet → Gridline color. That changes the screen only: gridlines don’t print unless you tick Page Layout → Gridlines → Print, so use borders for anything printed or saved as PDF.

In Excel, the gridlines are grey by default, and when you insert a border, it’s black (Automatic) by default. But sometimes you need to have borders in a different color.

In this tutorial, we will look at the quick steps to change the border color of selected cells and change the color of all cells in the whole worksheet (gridlines).

Steps to Change Border Color From Ribbon

In some cases, you want to change the border color of the cells, and the first way to change it is from the Borders drop-down.

  1. First, go to the Home tab, and in the Font group, click on the arrow next to the Borders button to open the drop-down.
  2. After that, you’ll get a list of options; choose Line Color from the Draw Borders section.
    border-drop-down-select-line-color
  3. Now, a list with different color options will appear, and you can select any color of your choice.
    list-of-color-choose-one
  4. Once you select the color, you can see that your cursor turns into a pencil (Draw Border).
  5. And now you can draw the border of the desired cells in the chosen color using the pencil. Press Esc when you are done.

As you can see, the border color of the top row has changed.

border-of-top-row-has-changed

Note: You can change the border color without selecting the cells first with this method.

The line color you pick also stays selected for the next borders you apply. So, instead of drawing, you can select the cells, open the Borders drop-down again and click All Borders or Outside Borders, and Excel applies them in the new color. It changes existing borders too, as they get redrawn in the new color.

Change Border Color using Format Cells Option

There are multiple steps to change the border color from the Format Cells dialog box.

  1. In this method, you need to select the range of cells whose border colors you want to change.
  2. After this, right-click on the selected cells and choose the Format Cells option (or press Ctrl + 1).
    select-format-cells-by-right-click-on-selected-cell
  3. Once the Format Cells dialog box opens, click on the Border tab to customize the border color.
  4. Now, click on the Color drop-down and select the color for the cell border from the list.
    pick-any-color-from-format-cells-dialog-box
  5. Next, pick any of the presets (Outline or Inside) at the top, or click the individual borders. Pick the color before the borders, as the color only applies to the borders you click after choosing it.
  6. After changing the border and color settings, click on the OK button to apply.
    select-border-from-presets
  7. In the end, you can see the border color of selected cells of column C in the worksheet has been changed from black to red.
    change-border-color-of-column-C-cells

Change the Color of Gridlines to use it as Borders

If you don’t want to use a border in a worksheet, there’s one more option which is quite handy: change the color of the gridlines for the entire worksheet.

By this method, you can change the color of gridlines of the entire worksheet instead of selecting a certain number of cells through the below steps:

  1. First, click on the File tab and choose Options (in some versions, it’s under More).
    click-on-file-choose-options
  2. The Excel Options window will appear, then click on the Advanced option from the menu.
  3. Now, scroll down the list of options on the right side and find “Display options for this worksheet”.
  4. In this, you will see the Gridline color option under the Show Gridlines category.
    in-Excel-options-dialog-box-select-advanced-settings
  5. Click on the Gridline color drop-down to pick the desired color, and then click OK.
    select-gridline-color-and-click-ok
  6. Last, you can see the gridline color of the entire worksheet has changed to red.
    gridline-color-of-entire-sheet-has-changed

Keep in mind that gridlines are only for the screen. They don’t print unless you turn on Print under Gridlines on the Page Layout tab, and the gridline color applies only to the sheet you choose in the drop-down above the options, not to the whole workbook.

Change Border Color with VBA

If you need to change the border color of a range often, you can do it with a short macro. The following code applies all borders to A1:C10 in red:

Sub change_border_color()
With Range("A1:C10").Borders
.LineStyle = xlContinuous
.Color = RGB(255, 0, 0)
End With
End Sub

Change the RGB values to use any other color, or use .ThemeColor to pick a color from the workbook theme.

Frequently Asked Questions

Why doesn’t the new line color change my existing borders?

The line color applies only to the borders you draw or apply after picking it. Select the cells and apply the border again (for example, All Borders), and Excel redraws it in the new color.

How do I change the default border color in Excel?

There’s no setting for the default border color. The Automatic color is black, so pick a line color each time, or create a cell style with the border color you want and apply that style.

Do gridline colors print?

No. Gridlines don’t print by default. If you need colored lines on paper, use borders, or turn on Print under Gridlines on the Page Layout tab.

Puneet Gogia

Written by

Puneet Gogia

Microsoft MVP — Excel · Founder, Excel Champs

Twelve years of teaching Excel, and a decade before that using it as a data analyst. Every tutorial here is written from a file I actually built.

3M+ readers helped
1,000+ tutorials written
Since 2015 teaching Excel