Can You Change Border Color in Excel? Steps and Tips

How-to basics · Updated November 19, 2026

Yes. In Excel for Microsoft 365 on Windows, select the cells, go to Home > Font > Borders ▼ > Line Color, choose a color, then apply a border from the Borders menu. To recolor a specific existing edge precisely, open Format Cells and use its Border tab. The key distinction is that choosing a line color sets the color for borders you apply next; it does not always recolor every existing border automatically.

Where Excel’s border color controls are

Border settings are in the Font group on the Home tab, alongside font, fill, and alignment controls. The Borders button usually displays a small grid icon. Its arrow opens a menu of border placements and additional options, including Line Color and Line Style. If the ribbon is condensed because the Excel window is narrow, the group may appear differently, but the controls remain on Home.

Line Color and the cell fill-color bucket do different jobs. Line Color changes the strokes around or within cells; the fill-color control changes the background inside cells. Likewise, changing the font color affects text, not the border. If the color swatch you choose appears to do nothing, check that you applied a border after choosing it.

Change a border color with the ribbon

For a straightforward range, use this sequence in Excel for Microsoft 365 on Windows:

  1. Select the cell or range whose border you want to format. You can select several nonadjacent cells by holding Ctrl while selecting them.
  2. On the Home tab, locate the Font group and open the arrow beside Borders.
  3. Point to Line Color, then choose a color from the palette. If you do not see a suitable option, select More Colors when it is available.
  4. Open the Borders menu again and choose the placement, such as Outside Borders, All Borders, or Bottom Border.

For example, to give a table a blue outline, select the table range, choose blue under Line Color, then choose Outside Borders. To draw blue lines around every cell, choose All Borders instead. That option adds inside horizontal and vertical lines as well as the outside edge, so it can make a dense table look busy.

Some ribbon versions keep the chosen line color available as the current border color, and the Borders button may apply the most recently used border when clicked directly. Using the dropdown to choose a specific placement makes the result clearer. If a border appears in the wrong color, repeat the color selection and then apply the desired edge or edges.

Set individual edges in Format Cells

Format Cells gives more control when a selection has several existing edges and you want to change only some of them. Select the cells and open the dialog with Ctrl+1 on Windows. Choose the Border tab. The tab includes a color selector, line-style choices, and a preview area with buttons for applying borders to particular sides and internal divisions.

Choose the color first, then click the relevant edge in the preview or use the available border buttons. For instance, to recolor only a selected range’s bottom edge, choose the new color and click the bottom-edge control. To set a matching outline, apply the top, bottom, left, and right edges. The preview helps show which edges will be affected before you confirm with OK.

For an existing border, selecting a new color alone is not the same as editing its color. In the Border tab, you generally need to choose the new color and reapply the edge in the preview. If an edge is already present, clicking its preview control can toggle it off; click again as needed to leave it displayed in the selected color. Review the preview before closing the dialog.

On Excel for Mac, the ribbon also has border controls on the Home tab, though their arrangement and menu labels can vary with the window size and release. The Format Cells dialog is available from the Format menu or with Control+1 in many Mac keyboard layouts. Excel for the web also provides basic border and line-color controls on Home, but some dialog details and advanced formatting options can differ from desktop Excel.

Choose a color that works for the sheet

The color palette includes theme colors and standard colors, and Excel may offer a More Colors option for a custom choice. Theme colors are useful when the workbook uses a coordinated design: selecting a theme color helps keep borders consistent with other workbook formatting. A custom color can be more suitable when a report must follow a particular brand palette, but the exact controls shown in the custom-color dialog can vary by platform and update.

Border colors work best when they clarify structure rather than compete with the data. A subtle gray outline can separate a table from surrounding cells; a stronger color can emphasize a totals row or an input area. Consider these practical choices:

  • Use a modest contrast for routine cell divisions, especially in large tables.
  • Reserve a saturated color for a small number of meaningful edges, such as a section boundary or key total.
  • Check that text and fill colors remain readable when the border is added.
  • Use the same color consistently for the same purpose across a worksheet or workbook.

Color should not be the only signal that information matters. A reader may print in grayscale, have color-vision differences, or view the sheet on a display where colors look different. Pair an important colored border with a clear label, a suitable line style, or another meaningful cue.

Border color, gridlines, and cell fill are not the same

A frequent source of confusion is the difference between borders and gridlines. Gridlines are the worksheet’s default visual guides between cells. They are not ordinary cell borders, and choosing Line Color does not recolor the sheet’s gridlines. Borders are formatting that you apply to selected cells; they can be printed and are useful for defining a designed table or emphasizing particular areas.

To show or hide worksheet gridlines in desktop Excel for Windows, use the View tab and the Gridlines checkbox. That setting affects the worksheet display; it is separate from the border-color controls. For print output, gridline printing is controlled separately on the Page Layout tab in Sheet Options. If you need colored lines in a printed report, apply actual borders rather than relying on the default gridlines.

Cell fill is different again: it colors the interior of a cell. A filled range with no borders may look like a solid block, while a range with borders has visible edges. For a clean table, you can combine a light fill with a darker border, but check the result on screen and in print preview so the lines remain distinguishable.

Use border color with conditional formatting

Conditional formatting can apply a border when a cell meets a rule, which is useful when the formatting should respond to changing values. For example, a rule could highlight overdue dates or mark values outside a target range. On Windows, start at Home > Conditional Formatting and choose a rule type or Manage Rules. When editing a rule, use Format to open the formatting options, then set a border on the Border tab if that option is available for the chosen rule.

Conditional formatting is different from manually coloring a border: the rule determines when the formatting appears, and the result can change as cell values change. If a manually applied border seems to disappear or look different, check whether a conditional-formatting rule applies to the same cells. Use Home > Conditional Formatting > Manage Rules to inspect rules for the current selection or worksheet, then edit, reorder, or remove the relevant rule as appropriate.

Do not assume every conditional-formatting rule supports every formatting choice in every Excel version. The format dialog and available options can vary, particularly in Excel for the web. For a static border, ordinary cell formatting is simpler; use a rule when the border needs to reflect data conditions automatically.

Apply the same border style elsewhere

Once a border looks right, you can reproduce it without rebuilding every edge manually. Format Painter, found on the Home tab, copies formatting from one selection to another; it can copy borders along with other cell formatting. Because it also copies attributes such as fill and font formatting, use it carefully if the destination cells should retain their existing appearance.

Another option is Paste Special with Formats. Copy the source cell or range, select the destination, and use the Paste Special options to paste formatting rather than values. The exact menu arrangement varies by Excel version. If the destination’s existing borders matter, test on a small range first: pasted formatting may replace the formatting you intended to keep.

For a consistent worksheet design, it helps to decide in advance which border styles mean outside edge, header division, or total. A simple convention, such as thin neutral inside lines and a stronger top edge above totals, is easier to maintain than giving each section an unrelated color.

Common problems and how to fix them

  • The border stays black: Choose Line Color before applying the border, and confirm that you selected the intended color rather than a nearby palette swatch. Reapply the border afterward.
  • Only part of the range changes: Check the selection. A border command affects selected cells, and merged cells or nonadjacent selections can make the result less intuitive.
  • The wrong edges appear: Use the Borders dropdown to pick a specific placement, or use the Border tab’s preview to control individual sides and inside lines.
  • The lines vanish on screen: Confirm that you applied a border, not just selected a line color. Also check zoom level and display contrast; thin, pale lines can be difficult to see.
  • The printout looks different: Check Print Preview and page settings. Gridlines and applied borders are separate, and thin or light-colored borders may be less visible on a printer.
  • Formatting seems to return: Check for conditional-formatting rules that apply to the same cells. A rule can affect how the formatting is displayed.

If the border color needs to be reset, select the affected cells and choose a new color, then reapply the relevant edges. There is no need to change the cell fill or worksheet gridline settings unless those are also part of the problem.

Frequently Asked Questions

Can I change the color of an existing border in Excel?

Yes. Select the cells, open Format Cells with Ctrl+1 on Windows, and use the Border tab to select a color and reapply the edge or edges in the preview. Choosing a line color without reapplying the existing edge may not recolor it.

Can I change Excel’s gridline color?

Not with the cell-border Line Color control. Gridlines are worksheet guides, while borders are formatting applied to cells. If you need colored lines, apply cell borders. In desktop Windows Excel, gridlines can be shown or hidden from View, but their color is not changed there.

How do I change only the bottom border color?

Select the target cells, open Format Cells > Border, choose a line color, and apply the bottom edge in the preview. Confirm that the preview shows the bottom line and no unwanted edges before selecting OK.

Can I use a custom border color?

Often, yes. Open the Line Color palette or the color selector on Format Cells and choose More Colors if offered. Custom-color options differ by Excel version and platform, so the fields available for specifying a precise color may not be identical everywhere.

Will a colored border print?

Applied cell borders can print, but the visible result depends on the printer, paper, and color settings. Check Print Preview, especially for pale or thin lines. Worksheet gridlines are separate and have their own print setting.

Can conditional formatting change a border color automatically?

It can, when the rule’s formatting options include a border. Edit the rule from Home > Conditional Formatting > Manage Rules, choose Format, and set the border. The border then depends on whether the rule’s condition is met.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.