Apply or remove cell borders on a worksheet (2024)

Excel

Enter and format data

Format data

Format data

Apply or remove cell borders on a worksheet

Excel for Microsoft 365 Excel for the web Excel 2021 Excel 2019 Excel 2016 More...Less

By using predefined border styles, you can quickly add a border around cells or ranges of cells. If predefined cell borders do not meet your needs, you can create a custom border.

Note:Cell borders that you apply appear on printed pages. If you do not use cell borders but want worksheet gridline borders to be visible on printed pages, you can display the gridlines. For more information, see Print with or without cell gridlines.

WindowsWeb

  1. On a worksheet, select the cell or range of cells that you want to add a border to, change the border style on, or remove a border from.

  2. On the Home tab, in the Font group, do one of the following:

    • To apply a new or different border style, click the arrow next to Borders Apply or remove cell borders on a worksheet (1), and then click a border style.

      Tip:To apply a custom border style or a diagonal border, click More Borders. In the Format Cells dialog box, on the Border tab, under Line and Color, click the line style and color that you want. Under Presets and Border, click one or more buttons to indicate the border placement. Two diagonal border buttons Apply or remove cell borders on a worksheet (2) Apply or remove cell borders on a worksheet (3) are available under Border.

    • To remove cell borders, click the arrow next to Borders Apply or remove cell borders on a worksheet (4), and then click No Border Apply or remove cell borders on a worksheet (5).

  • The Borders button displays the most recently used border style. You can click the Borders button (not the arrow) to apply that style.

  • If you apply a border to a selected cell, the border is also applied to adjacent cells that share a bordered cell boundary. For example, if you apply a box border to enclose the range B1:C5, the cells D1:D5 acquire a left border.

  • If you apply two different types of borders to a shared cell boundary, the most recently applied border is displayed.

  • A selected range of cells is formatted as a single block of cells. If you apply a right border to the range of cells B1:C5, the border is displayed only on the right edge of the cells C1:C5.

  • If you want to print the same border on cells that are separated by a page break, but the border appears on only one page, you can apply an inside border. This way, you can print a border at the bottom of the last row of one page and use the same border at the top of the first row on the next page. Do the following:

    1. Select the rows on both sides of the page break.

    2. Click the arrow next to Borders Apply or remove cell borders on a worksheet (6), and then click More Borders.

    3. Under Presets, click the Inside button Apply or remove cell borders on a worksheet (7).

    4. Under Border, in the preview diagram, remove the vertical border by clicking it.

  1. On a worksheet, select the cell or range of cells that you want to remove a border from.

    To cancel a selection of cells, click any cell on the worksheet.

  2. On the Home tab, in the Font group, click the arrow next to Borders Apply or remove cell borders on a worksheet (8), and then click No Border Apply or remove cell borders on a worksheet (9).

    --OR--

    Click Home > the Borders arrow > Erase Border, and then select the cells with the border you want to erase.

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.

    Apply or remove cell borders on a worksheet (10)
  2. Click New Cell Style.

    Apply or remove cell borders on a worksheet (11)
  3. In the Style name box, type an appropriate name for the new cell style.

  4. Click Format.

  5. On the Border tab, under Line, in the Style box, click the line style that you want to use for the border.

    Apply or remove cell borders on a worksheet (12)
  6. In the Color box, select the color that you want to use.

  7. Under Border, click the border buttons to create the border that you want to use.

  8. Click OK.

  9. 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.

  10. Click OK.

  11. 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.

      Apply or remove cell borders on a worksheet (13)

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 Apply or remove cell borders on a worksheet (14).

  2. Pick Draw Borders for outer borders or Draw Border Grid for gridlines.

    Apply or remove cell borders on a worksheet (15)

  3. Click the Borders arrow > Line Color arrow, and then pick a color.

  4. Click the Borders arrow > Line Style arrow, and then pick a line style.

  5. Select cells you want to draw borders around.

Add a border, border color, or border line style

  1. Select the cell or range of cells that you want to add a border around, change the border style on, or remove a border from.

2. Click Home > the Borders arrow, and then pick the border option you want.

  • Add a border color - Click the Borders arrow > Border Color, and then pick a color

  • Add a border line style - Click the Borders arrow > Border Style, and then pick a line style option.

Tips

  • The Borders button shows the most recently used border style. To apply that style, click the Borders button (not the arrow).

  • If you apply a border to a selected cell, the border is also applied to adjacent cells that share a bordered cell boundary. For example, if you apply a box border to enclose the range B1:C5, the cells D1:D5 will acquire a left border.

  • If you apply two different types of borders to a shared cell boundary, the most recently applied border is displayed.

  • A selected range of cells is formatted as a single block of cells. If you apply a right border to the range of cells B1:C5, the border is displayed only on the right edge of the cells C1:C5.

  • If you want to print the same border on cells that are separated by a page break, but the border appears on only one page, you can apply an inside border. This way, you can print a border at the bottom of the last row of one page and use the same border at the top of the first row on the next page. Do the following:

    1. Select the rows on both sides of the page break.

    2. Click the arrow next to Borders , and then click the Inside Horizontal Border

Remove a border

To remove a border, select the cells with the border and click the Borders arrow > No Border.

Need more help?

You can always ask an expert in the Excel Tech Communityor get support inCommunities.

See Also

Change the width of cell borders

Need more help?

Want more options?

Discover Community

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Apply or remove cell borders on a worksheet (16)

Microsoft 365 subscription benefits

Apply or remove cell borders on a worksheet (17)

Microsoft 365 training

Apply or remove cell borders on a worksheet (18)

Microsoft security

Apply or remove cell borders on a worksheet (19)

Accessibility center

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Apply or remove cell borders on a worksheet (20)

Ask the Microsoft Community

Apply or remove cell borders on a worksheet (21)

Microsoft Tech Community

Apply or remove cell borders on a worksheet (2024)

References

Top Articles
Latest Posts
Article information

Author: Arielle Torp

Last Updated:

Views: 5859

Rating: 4 / 5 (61 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Arielle Torp

Birthday: 1997-09-20

Address: 87313 Erdman Vista, North Dustinborough, WA 37563

Phone: +97216742823598

Job: Central Technology Officer

Hobby: Taekwondo, Macrame, Foreign language learning, Kite flying, Cooking, Skiing, Computer programming

Introduction: My name is Arielle Torp, I am a comfortable, kind, zealous, lovely, jolly, colorful, adventurous person who loves writing and wants to share my knowledge and understanding with you.