Set borders in excel

Apply or remove cell borders on a worksheet

Excel for Microsoft 365 Excel for the web Excel 2021 Excel 2019 Excel 2016 Excel 2013 Excel 2010 Excel 2007 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.

  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 Button image, 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 Button image   Button image are available under Border.

    • To remove cell borders, click the arrow next to Borders Button image, and then click No Border Button image.

  • 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 Button image, and then click More Borders.

    3. Under Presets, click the Inside button Button image.

    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 Button image, and then click No Border Button image.

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

    More button in the Style gallery

  2. Click New Cell Style.

    New cell style option

  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.

    Format cell style

  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.

      Cell Style gallery

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 Borders button on the Home tab.

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

    Border drop down menu to pick draw border options

  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 Community or get support in the Answers community.

See Also

Change the width of cell borders

Need more help?

Border in Excel

Excel Borders (Table of Contents)

  • Borders in Excel
  • How to add Borders in Excel?

Borders in Excel

Borders are the boxes formed by lines in the cell in Excel. By keeping borders, we can frame any data and provide them with a proper define limit. To distinguish specific values, outline summarized values or separate data in ranges of cells; you can add a border around cells.

How to add Borders in Excel?

Adding borders in Excel is very easy and useful to outline or separate specific data or highlight some values in a worksheet. Normally, we can easily add all top, bottom, left, or right borders for selected cells in Excel. Option for Borders is available in the Home menu, under the font section with the icon of Borders. We can also use shortcuts to apply borders in Excel.

You can download this Borders Excel Template here – Borders Excel Template

Let’s understand how to add Borders in Excel.

Example #1

For accessing Borders, go to Home and select the option as shown in the below screenshot under the Font section.

Border Option

Once we click on the option of Borders shown above, we will have a list of all kind of borders provided by Microsoft in its drop-down option, as shown below.

List of Borders

Here we have categorized Borders into 4 sections. This would be easy to understand because all sections are different from each other.

The first section is a basic section with only Bottom, Top, Left, and Right Borders. By this, we can only create one side border only for one cell or multiple cells.

Border in Excel example 1-3

The second section is the full border section, which has No Border, All Borders, Outside Borders, and Thick Box Borders. By this, we can create a full border that can cover a cell and a table as well. We can also remove the border as well from the selected cell or table by clicking on No Border.

No Borders

The third section is a combination of the bottom borders, Bottom Double Border, Thick Bottom Border, Top and Bottom Border, Top and Thick Bottom Border, and Top Double Bottom Border.

Bottom Borders

These types of double borders are majorly used in underlining the headlines or important texts.

The Fourth section has a customized border section, where we can draw or create a border as per our need or make changes in the existing border type. We can change the color, thickness of the border as well in this section of Borders.

Draw Borders

Once we click on the More Borders Option at the bottom, we will see a new dialog box named Format Cells, which is a more advanced option for creating Borders. It is shown below.

Format Cells

Example #2

We have seen the basic function and use for all kinds of borders and how to create those in the previous example. Now we will see an example where we will choose and implement different Borders and see how those Borders in any table or data can be framed.

We have a data table, which has details of Owner, Block, and Apartment No. Now we will frame the Borders and see how the data would look like.

As row 2 is the headline, we will prefer a double bottom line selected from the third section.

And all cell will be covered with a box of All Borders which can be selected from the second section.

And if we select Thick Border from the second section, then the whole table will be bound to a perfect box, and selected data will automatically get highlighted. Once we are done with all the mentioned border type, our table would like this, as shown below.

Border Types

As we can see, the complete data table is getting highlighted and ready to be presented in any form.

Example #3

There is another way to frame borders in excel. This is one of the shortcuts of accessing the functions available in excel. For accessing borders, the shortcut way first selects the data we want to frame with borders and then press ALT + H + B simultaneously to enable the border menu in Excel.

ALT + H + B

ALT + H will enable the Home menu, B will enable the borders.

ALT + H

B enabling the Borders

Once we do that, we will get a list of all kinds of borders available in excel. And this list itself will have the specific keys mentioned to set for any border as shown and circled in the below screenshot.

List of Options

We can navigate to our required Border type by pressing the Key highlighted in the above screenshot, or else we can use direction keys to scroll up and down to get the desired border frame. Let’s use All Borders for this case by pressing ALT+H+B+A simultaneously after selecting the data table. Once we do that, we will see the selected data is now framed with all borders. And each cell will be now having its own border in black lines, as shown.

Black Lines

Let’s frame one more border of another type with the same process. Select the data first and then press ALT+H+B+T Keys simultaneously. We will see that data is framed with Thick Borders, as shown in the below screenshot.

Thick Outline

Pros of Print Borders in Excel

  • Creating the border around the desired data table makes data presentable to anyone.
  • Border frame in any data set is quite useful when printing the data or pasting the data in any other file. By this, we make the data look perfectly covered.

Things to Remember

  • Borders can be used with the shortcut key Alt + H + B, which will directly take us to the Border option.
  • Giving a border in any data table is very important. We must provide the border after every work so that the data set can be bound.
  • Always make proper alignment so that once we frame the data with a border and use it in different sources, the column width will be automatically set.

Recommended Articles

This has been a guide to Borders in Excel. Here we discussed how to add Borders in Excel and use shortcuts for borders in Excel along with practical examples and a downloadable excel template. You can also go through our other suggested articles –

  1. LEFT Formula in Excel
  2. VBA Borders
  3. Format Cells in Excel
  4. Print Gridlines in Excel

What are the Borders in Excel?

Borders in Excel are outlined in data tables or a specific range of cells. In Excel, borders are used to separate the data in borders from the rest of the text. It is a good way of representing data. In addition, it helps the user to look for specific data easily. These borders are available in the “Home” tab in the fonts section.

Table of contents
  • What are the Borders in Excel?
    • Explained
    • How to Create and Add Borders in Excel? (with Examples)
      • Example #1
      • Example #2
      • Example #3
      • Example #4
    • Things to Remember While Creating Borders in Excel
    • Recommended Articles

Explained

We can add the border to a single cell or multiple cells. Borders are of different styles and can be used as per the requirement.

Borders help present the data set in a more presentable format in ExcelFormatting is a useful feature in Excel that allows you to change the appearance of the data in a worksheet. Formatting can be done in a variety of ways. For example, we can use the styles and format tab on the home tab to change the font of a cell or a table.read more.

We can use borders for tabular format data or headlines to emphasize a specific set of data or can be used to distinguish different sections.

  • We can use it to define or divide the sections of a worksheet.
  • We can use it to emphasize specific data.
  • We can also make the data more understandable and presentable.

You are free to use this image on your website, templates, etc, Please provide us with an attribution linkArticle Link to be Hyperlinked
For eg:
Source: Border in Excel (wallstreetmojo.com)

How to Create and Add Borders in Excel? (with Examples)

We can create and add borders to the specific set of data.

Example #1

We have data of marks of a student for three subjects of an annual examination. We will have to add the borders in this data to make it more presentable.

  1. Now, we must select the data we want to add to the borders.

    border in excel example 1.2

  2. In the font group on the “Home” tab, click the down arrow next to the “Borders” button. You may see the drop-down list of borders, as shown in the figure below.

    border in excel example 1.3

  3. We have different borders styles. Therefore, we may select the “OUTSIDE BORDERS” option for our data.

    border in excel example 1.4

  4. We may find the result by using “OUTSIDE BORDERS” in the data.

    border in excel example 1.5

Now, let us learn with some more examples.

Example #2

We have data of marks of a student for three subjects of an annual examination. We will have to add the borders in this data to make it more presentable.

  • Data of marks of 5 students for three subjects in an annual examination is shown below.

border in excel example 1.1

  • Now, we must select the data we want to add to the borders.

border in excel example 1.2

  • Now, in the “Font” group on the “Home” tab, we need to click the down arrow next to the “Borders” button. As shown in the figure below, we may see the drop-down list of borders.

border in excel example 1.3

  • Now that we have different border styles, we must select the “THICK OUTSIDE BORDERS” option for data.

border in excel example 2.1

  • As a result, we may find the result by using “THICK OUTSIDE BORDERS” to the data shown below.

border in excel example 2.2

Example #3

We have data on the marks of a student for three subjects of an annual examination. We will have to add the borders in this data to make it more presentable.

  • Data of marks of 5 students for three subjects in an annual examination is shown below.

border in excel example 1.1

  • Now, select the data to which you want to add borders.

border in excel example 3.1

  • Now, in the “Font” group on the “Home” tab, we may need to click the down arrow next to the “Borders” button. And we may see the drop-down list of borders as shown in the figure below. Then, select the “ALL BORDERS” options for the data.

border in excel example 3.2

  • As a result, we may find the result by using “ALL BORDERS” to the data.

border in excel example 3.3

Example #4

We have data on the marks of a student for three subjects of an annual examination. We need to add the borders in this data to make it more presentable.

  • Data of marks of 5 students for three subjects in an annual examination is shown below.

Student data

  • Now, we must select the data we want to add borders.

select data

  • Now, in the “Font” group on the “Home” tab. Then, we need to click the down arrow next to the “Borders” button. As shown in the figure below, we may see the drop-down list of borders. Now, select the “ALL BORDERS” options for our data.

select option example 3.2

  • We may now find the result using “ALL BORDERS” in the data.

all borders example 3.3

  • As shown in the figure below, we can change the border’s thickness per the requirement. Select the data you want to change the border’s thickness for this.

border in excel example 4.1

  • We need to go to the border drop-down list and click “LINE STYLE.”

select line style example 4.2

  • Now, we get a list of line styles and use the style as per the requirements. We will use the second last line style for our data.

line style example 4.3

  • We may get the result as shown below.

line style result example 4.4

Things to Remember While Creating Borders in Excel

  1. We select cells where the border needs to be added.
  2. The borders differentiate the data separately.
  3. We can change border styles by the “Borders” icon in the “Font” tab.

Recommended Articles

This article has been a guide to Borders in Excel. Here, we discuss how to create/add cell borders in Excel using different options and examples. You may also look at these useful functions in Excel: –

  • Borders in VBA Excel
  • VBA Select Cell
  • Shortcut for Excel Format Painter
  • Format Number in VBA
  • Marksheet in Excel

Reader Interactions

See all How-To Articles

This tutorial demonstrates how to add border lines in Excel and Google Sheets.

add lines borders 10

Set Borders From the Ribbon

A border is a line – set over the gridline – around a cell or range of cells. You can use it to emphasize certain data, separate different sections, etc. Worksheets are often full of information, so setting borders is useful in drawing attention to important information and making your spreadsheet look more organized and presentable. The fastest way to make borders in Excel is to use one of the preset options from the Ribbon.

  1. First, select the cell or range where you want to add borders (in this example A1:C1).
  2. Then in the Ribbon, click on Home.
  3. In the Font group, click on the arrow next to the Borders button.
  4. From the drop-down menu, choose the border type you want to apply.

add lines borders 1

  1. To apply a line color other than the default, choose the desired Line Color under Draw Borders, and then select the border type.

add lines borders 11

Now you have borders around the cell or range of cells you selected (here, A1:C1).

add lines borders 12

Note: You can also use VBA code to add borders.

Set Borders – Format Cells Dialog Box

Using the Format Cells window is the best way to add borders to cells, because it gives you access to all settings in one place, as well as a diagram preview.

  1. First, (1) select the cell or a range of cells to which you want to add borders. Then in the Ribbon, (2) go to Home and (3) click on the borders button. From the drop-down menu, (4) choose More Borders…

add lines borders 2

  1. The Format Cells dialog box appears. Choose the style and color of the line, then add the borders you want. You can choose to use presets or to use individual elements such as bottom border, top border, etc. This example uses outside borders for the A1:C6 and a bottom double border for A1:C1.
    The diagram preview displays every change immediately. Check that the preview matches the borders you want, and click OK.

add lines borders 3

As a result, the borders are added.

add lines borders 6

Draw Borders

Alternatively, instead of selecting the cells first and then choosing from the range of the options, you can draw borders directly on the worksheet.

  1. First, in the Ribbon (1) go to Home, then (2) click on the borders button, and in the drop-down menu (3) choose Line Color and Line Style.

add lines borders 13

  1. After that, the draw border mode is activated, and the cursor changes to a pencil. Now you can start to draw individual lines.

add lines borders 14

  1. To stop drawing borders, just click on the borders button. The cursor changes back to a white cross.

add lines borders 15

Draw Multiple Borders at Once

If you don’t want to draw individual lines, under Draw Borders group commands, you can choose between two drawing modes: Draw Border or Draw Border Grid.

By choosing the Draw Border mode, you’re able to drag a pencil around the range of cells you want to engird.

add lines borders 16

If you choose Draw Border Grid mode, all cells in the selected range will have borders around them.

add lines borders 17

Set Borders Shortcut

You can also use a keyboard shortcut to add a single border around a range of cells.

  1. Select the range of cells.

setborder select cells

  1. Press CTRL + SHIFT + &.
  2. An outside single border is placed around the selected cells.

setborder keyboard

Set Borders in Google Sheets

  1. First, select the cell or range of cells where you want to add borders.
  2. In the Toolbar, click the borders button.
  3. If you want to apply line color or type other than the default, click the border color button to change the color.
  4. Click border style to change the type of border line.
  5. Finally, choose the border(s) you want to apply.

add lines borders 18

Now the borders are added, as shown in the picture below.

add lines borders 19


Download Article


Download Article

This wikiHow teaches you how to insert borders in your Excel sheets. To add a border, you’ll need to select the cells that you want to add a border around, click the border icon, and then select the border that you want to insert.

  1. Image titled Insert Borders in Excel Step 1

    Double-click on any Excel sheet in your computer to open it up. If the worksheet with the cells you want to add borders to isn’t visible, click its tab once the workbook is open.

  2. Advertisement

  1. Image titled Insert Borders in Excel Step 2

    Click and drag over the cells you want until they turn blue. This selects the cells.

  1. Image titled Insert Borders in Excel Step 3

    You’ll see the next to «Borders» in the toolbar. The Borders button looks like a square with four quadrants. It’s next to the underline button on the Font group underneath the Home tab.

  2. Advertisement

  1. Image titled Insert Borders in Excel Step 4

    This option creates a border around the outside edges of all the cells you selected. You can choose any kind of border from the drop-down menu.

    • If you want borders around each individual box or cell, select All Borders from the drop-down menu instead.
    • If you want more formatting options for your border, such as line thickness or color, select those options near the end of the drop-down menu.
    • You can also click More Borders at the end of the drop-down menu then select the Border tab to edit the border settings further.
    • If you want to remove a border just highlight it again and select No Border from the Border button drop-down menu.

Ask a Question

200 characters left

Include your email address to get a message when this question is answered.

Submit

Advertisement

Thanks for submitting a tip for review!

wikiHow Video: How to Insert Borders in Excel

About This Article

Article SummaryX

To insert borders in excel, open your excel document and select the cells where you would like to add a border. Click the down arrow next to the Borders button on the Home tab which is located next to the Fonts group button. Then, select the border type from the dropdown menu.

Did this summary help you?

Thanks to all authors for creating a page that has been read 27,921 times.

Is this article up to date?

Понравилась статья? Поделить с друзьями:
  • Separate with comma in excel
  • Set as worksheet excel vba
  • Separate table in word
  • Set as excel миф
  • Separate sections in word