Excel Borders: How to Add, Change, and Remove Them

How-to basics · Updated November 21, 2026

To add a border in Excel for Microsoft 365 on Windows, select the cell or range, then choose Home > Borders in the Font group and pick a border style. Use the Borders menu’s line and color options to customize it, or choose No Border to remove borders. Borders are cell formatting: unlike worksheet gridlines, they can be styled and are included when you print a sheet.

What a border does in Excel

A cell border is a line that Excel draws along one or more edges of a cell. You can apply borders to a single cell, a rectangular range, or selected cells that are not next to one another. A border helps distinguish headings, totals, input areas, and sections in a worksheet without changing the values or formulas stored in those cells.

Excel treats the edges of cells separately. A selection can have a top, bottom, left, or right border, as well as inside horizontal and inside vertical lines. Preset choices such as All Borders and Outside Borders apply combinations of these edges. This makes it possible to outline a whole table, draw a grid through it, or emphasize only a total row.

For example, if a report occupies A1:D6, applying All Borders draws lines around each cell, while Outside Borders outlines the full range without adding lines between its cells. If you want a stronger divider below the headings in row 1, select A1:D1 and apply a bottom border instead.

How to apply a border from the ribbon

The Borders button is in the Home tab’s Font group. Its main button may show the most recently used border, while the small arrow beside it opens the menu of choices. Select the cells first so Excel knows where to apply the formatting.

  1. Select one cell or a range. To select a range, click the first cell and drag to the last, or click the first cell and Shift-click the last cell.
  2. Open Home > Borders using the arrow beside the Borders button.
  3. Choose a preset, such as Bottom Border, Outside Borders, or All Borders.
  4. Check the result and adjust the selection or border choice if needed. Use No Border to clear borders from the selected cells.

For a simple heading, a bottom border is often enough: it separates the heading row from the data without filling the worksheet with a box around every value. For a compact form where users need to see each entry area, an outside border around the input range can mark its boundary. The best choice depends on what the lines communicate, not just on how many options are available.

Choosing line style and color

The Borders menu includes options for line style and line color. Choose the desired style or color in the menu, then select the edge or preset to apply it. Excel uses the chosen setting for the next border operation; if a border does not look as expected, reopen the menu and check the active line style and color. The default is usually a thin solid line in the standard font color.

For a custom arrangement, select More Borders in the Borders menu. This opens the Format Cells dialog on its Border tab. The dialog lets you choose a line style and color, then apply them to individual edges using the border preview controls. You can also select preset options such as outline or inside borders there. The preview is useful when you want, for example, a thick bottom edge and thin internal lines rather than one style applied everywhere.

Suppose a quarterly report has headings in A1:D1, monthly figures in A2:D4, and a total in row 5. A restrained design might use a bottom border beneath row 1, inside horizontal borders between the data rows, and a double bottom border beneath the total. Select the relevant cells for each operation and use the dialog’s preview to verify which edge is changing. Avoid using many colors and line weights in the same table, since the visual hierarchy can become harder to follow.

Applying borders with Format Cells

The Format Cells dialog provides a more precise alternative to the ribbon presets. Select the cells and press Ctrl+1 on Windows, then open the Border tab. Choose a line style and color, and click the edge buttons or preview diagram to apply them. Click OK to keep the changes. The same dialog is available through the Borders menu’s More Borders command.

This method is especially helpful when the desired border is not one of the common presets. You can apply only an upper edge, add internal lines to a selected range, or use a different style on the outline and interior. Make sure the range is selected before opening the dialog: the settings apply to the current selection, and selecting a different range afterward does not automatically transfer them.

On Excel for Mac, the Home tab also provides a Borders menu, and Command+1 opens Format Cells. Ribbon placement and dialog appearance can vary slightly by platform or window size, but the border controls serve the same purpose. Excel for the web also has border options on its Home tab, although its interface and available formatting controls may not match the desktop dialog exactly.

Borders versus worksheet gridlines

Gridlines are the faint cell boundaries Excel displays across a worksheet by default. They are a viewing aid, not the same thing as cell borders. Gridlines usually are not printed unless you enable the worksheet’s print-gridlines setting; borders are explicit formatting and normally appear in print output. Applying a fill color to cells can also make their gridlines disappear from view, while a border remains visible.

If a table looks lined on screen but prints without those lines, it may be relying on gridlines rather than borders. Select the table cells and apply actual borders if the lines need to appear consistently in a printed or exported report. Conversely, if a worksheet looks crowded, you can hide gridlines without removing any borders. In Excel for Windows, use View > Show > Gridlines to control their on-screen display. For print settings, use Page Layout > Sheet Options > Gridlines and adjust the View or Print checkbox as appropriate.

One common misconception is that turning off gridlines removes all lines from the sheet. It only hides the default worksheet gridlines; borders that have been applied to cells remain. Similarly, turning gridlines on does not create borders that will reliably print. Checking Print Preview is a practical way to confirm how a formatted range will appear on paper.

Removing or correcting borders

To remove borders, select the affected cells and choose Home > Borders > No Border. This removes border formatting from the selection; it does not delete cell contents, fills, or number formats. If the unwanted line is shared by adjacent cells, inspect both sides of the relevant cells. A line visible between two cells can result from a border on either adjoining edge, so removing formatting from just one neighboring cell may not produce the result you expect.

If applying a new preset seems to leave an unexpected line, first verify the selected range. Then use No Border to clear the range and apply the intended borders again. This can be simpler than trying to identify several older border settings individually. If the unwanted line remains, check whether it is a gridline, a border on a neighboring cell, or part of a shape placed over the worksheet.

For a quick correction immediately after an action, Ctrl+Z on Windows undoes it; on Mac, use Command+Z. Undo is useful when a preset was applied to the wrong range, but it is not a substitute for checking a workbook’s formatting before saving or sharing it. When troubleshooting a complex sheet, apply formatting to a small test range first so you can see the effect before changing a larger area.

Copying borders and using conditional formatting

To reuse a border design, copy cells that have the desired formatting and paste them into the destination. Standard paste can copy contents and formatting together, so it may replace more than the borders. If you want to copy formatting without replacing cell values, use Paste Special > Formats where available, or use the Format Painter on the Home tab. The Format Painter copies formatting, which can include borders, fills, and fonts; it does not copy only the border by itself.

Conditional formatting can apply borders when a rule is true. In Excel for Windows, select the range and choose Home > Conditional Formatting > New Rule, create or select a rule, and use its formatting controls to set a border if the rule type supports formatting. For instance, a rule can visually mark values below a chosen threshold. Because the appearance depends on the rule and the cell’s value, conditional formatting is different from setting a permanent border directly. Review Conditional Formatting > Manage Rules if a border appears or disappears unexpectedly.

When you copy a range containing conditional formatting, its rules may also be copied or adjusted depending on the paste operation and rule references. If a border is behaving differently from its neighboring cells, inspect the conditional-formatting rules as well as the ordinary cell borders. This distinction is useful when a line seems impossible to remove with No Border: a rule may be drawing it again whenever its condition is met.

Good practices for readable worksheets

Borders work best when they clarify a structure that matters. A few consistent lines can direct attention to headings, subtotals, and input areas. Drawing a border around every cell in a large data set can make it harder to scan, particularly when the sheet already contains many rows and columns. Consider using spacing, a modest fill, or a clear heading style instead of adding increasingly heavy borders.

  • Use outside borders to define a small table or form, and reserve inside borders for places where readers need to distinguish individual entries.
  • Use a bottom border to separate a header or total row when a complete box would add unnecessary visual weight.
  • Keep line colors and weights consistent across sections that serve the same purpose.
  • Check the worksheet at normal zoom and in Print Preview, since a design that looks clear on screen may become dense on a printed page.
  • For a sortable or filterable data list, consider converting the range into an Excel table with Home > Format as Table. Tables provide built-in styling and filtering; their appearance is not simply a collection of hand-applied borders.

Cell borders are also distinct from outlines around selected cells. The green selection outline is an interface indicator showing which cell or range is active; it is not part of the worksheet’s printed formatting. If a line vanishes when you click elsewhere, it may have been the selection outline rather than a border.

Frequently Asked Questions

How do I put a border around a cell in Excel?
Select the cell, open Home > Borders, and choose Outside Borders or another suitable edge. For a custom line, choose More Borders and set the desired edges in the Format Cells dialog.

How do I add borders to every cell in a range?
Select the complete range and choose Home > Borders > All Borders. This adds an outline and lines between the selected cells. If you only need an outline around the range, choose Outside Borders instead.

Why do my Excel gridlines not print?
Worksheet gridlines are not the same as cell borders, and printing them is controlled separately. Enable Page Layout > Sheet Options > Gridlines > Print, or apply borders to the cells if you want explicit lines in the printed report.

How can I remove borders without deleting cell data?
Select the cells and choose Home > Borders > No Border. This clears border formatting only; values and formulas remain. Cell fills and other formatting are not removed by this command.

Can I change the thickness or color of an Excel border?
Yes. Open the Borders menu and choose a line style or line color, then apply the border. For more control over individual edges, open More Borders and set the style, color, and edges in Format Cells.

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.