To add borders to an Excel table in Microsoft 365 for Windows, select the cells, then choose Home > Font > Borders and pick a border option. Borders are cell formatting that can print; the faint gridlines on the worksheet are a separate display feature and are not a substitute for printed borders.
What Excel table borders do
A border is a visible line applied to one or more cell edges. It can outline a whole table, separate columns, mark a header row, or emphasize a total. Excel lets you choose which edges to show, along with line color and style. Borders belong to the cells, so they can be applied to an ordinary range or to cells inside an Excel table.
Excel tables also have built-in styles. Those styles can add visual treatments such as banded rows, header formatting, and borders. A table style is not the same thing as a border you apply directly to selected cells: the style is a reusable design for table parts, while direct borders are specific cell formatting.
Worksheet gridlines are different. They help you see cell boundaries while working, but they are not cell borders and are usually not printed. If you need lines to appear on paper or in a PDF, apply borders or turn on the worksheet’s gridline printing option.
Add borders to a table
Click inside the table and select the cells that should receive borders. To format the whole table, select its data cells; to emphasize only the headings, select the header cells. You can drag across cells, or click a cell and use Shift with the arrow keys to extend the selection.
- On the Home tab, find the Font group and open the Borders drop-down.
- Choose a preset such as All Borders, Outside Borders, Bottom Border, or No Border.
- Check the selected cells and adjust the choice if you need a different edge pattern.
All Borders places lines around each selected cell, which is useful for a compact matrix but can look busy across a large dataset. Outside Borders outlines the selection without drawing lines between every cell. For a common report layout, use a bottom border beneath the header and an outside border around the data area.
To set a particular line color or weight, open the Borders drop-down and use its Line Color or Line Style options when available, then apply the desired edge. For more control, open Format Cells: on Windows, press Ctrl+1, select the Border tab, choose a line style and color, then click the preview edges or a preset. On Mac, Command+1 opens Format Cells in current Excel versions; ribbon layout and labels can differ slightly.
Choose a border pattern that fits the data
The right border treatment depends on what readers need to distinguish. A spreadsheet that is clear on screen may become crowded when printed, especially if every cell has a dark line. Use the lightest pattern that makes the structure easy to follow.
- Outside Borders: useful for separating a table from surrounding notes or blank cells.
- All Borders: helpful for small grids where readers must track individual rows and columns.
- Bottom Border: a restrained way to distinguish a header or subtotal row.
- Top and Bottom Borders: useful for drawing attention to a totals row without enclosing every value.
- No Border: removes direct borders from the selected cells; it does not necessarily remove the table’s built-in style.
For example, a sales table with columns for Region, Month, and Revenue might use a colored table header, banded rows, and a subtle bottom border under the headings. A report intended for black-and-white printing should not depend on color alone; use contrast and line placement to make sections distinct.
Table styles versus cell borders
When a cell in a formatted table is selected, Excel displays the Table Design tab. Its Table Styles gallery offers ready-made designs, and the Table Style Options checkboxes let you control features such as Header Row, Total Row, Banded Rows, and First Column. A style can provide a consistent look across the table without applying individual borders one at a time.
To try a built-in style, click in the table, open Table Design, and choose a style from Table Styles. Use the gallery’s More button to see additional choices. If you are unsure which style is active, the gallery indicates the selected style. You can also use the style options to turn banding or a total row on or off, depending on the structure you need.
Direct borders are useful for a one-off adjustment, such as adding a heavier line above a totals row. A table style is better when you want the same treatment to apply across the table and remain consistent as its rows change. If a style change alters the appearance of manually formatted cells, review the affected area and reapply the direct border as needed; style and cell formatting can interact visually.
Create a custom table style
If the built-in designs do not provide the border treatment you need, Excel for Microsoft 365 on Windows lets you create a custom table style. Click inside the table, open Table Design, open the Table Styles gallery, and choose New Table Style. Give the style a name, select a table element such as Whole Table, Header Row, or Total Row, and choose Format to set its font, fill, and border. Repeat for any other elements you want to customize, then save the style.
Table elements matter because Excel applies formatting to parts of a table, not just to an undifferentiated block. For example, a custom style can give the Header Row a strong bottom edge and give the Total Row a top edge. If banded rows are enabled, the style can also format alternating row stripes. Preview the result on a table with representative headers and totals before relying on it in a final report.
Custom styles are useful for repeated workbooks, but they are not required for ordinary borders. For a single table, using the Borders menu is usually quicker. The exact gallery and custom-style options can vary by platform and Excel update; Excel for the web has a more limited interface than the desktop app, so use desktop Excel if you cannot find the custom-style command.
Make borders show on screen and in print
If you want to hide worksheet gridlines on screen, go to View and clear the Gridlines checkbox. This affects the worksheet display, not cell borders. To control whether gridlines print, use Page Layout > Sheet Options > Gridlines > Print. This setting is separate from border formatting, and borders remain the more dependable way to define a table’s edges in a printed report.
Before printing, use File > Print to inspect the preview. Check that the table fits the page, that thin lines remain visible, and that no important edge is clipped. If the border is too faint, select the cells and choose a darker color or heavier line through the Borders menu or Format Cells. Print scaling can make a very large sheet difficult to read, so adjust the print layout rather than relying on increasingly heavy borders to clarify a crowded page.
For a PDF, use Excel’s print preview and save or print to PDF through the available system options. The preview is useful because a border that looks clear at normal screen zoom may be hard to see at the final page size. Gridlines, meanwhile, can be set not to print even while they remain visible on screen.
Common border problems and fixes
- Lines seem to disappear: The selected cells may have No Border, a white or very pale line color, or a thin style that is difficult to see. Reopen the Borders menu and apply a visible color and edge.
- Only some cells change: Check the selection before applying the command. A border choice affects selected cells, not automatically every cell in the table.
- The table still looks divided after choosing No Border: A table style or worksheet gridlines may still create visible separation. Review the active Table Design style, and separately check View > Gridlines.
- Borders do not appear in print: Confirm that you applied actual cell borders, then inspect File > Print. Gridline printing is controlled separately under Page Layout > Sheet Options.
- A new row looks different: A table’s style generally continues to format table rows, but direct formatting and the table’s location can affect how new cells look. Inspect rows added to the table and reapply a border if necessary.
Conditional formatting is another possible source of a mismatch: a rule can change cell appearance when its conditions are met. If a border seems inconsistent only for certain values, check Home > Conditional Formatting > Manage Rules for rules that apply to those cells.
Good habits for readable tables
Use borders to communicate structure rather than decorate every cell. Strong lines can separate a header or totals row; lighter lines can divide dense data; and generous spacing or banded rows may make a table easier to scan than a heavy grid. Keep the same visual convention across related worksheets so readers do not have to relearn what each line means.
When applying borders to a table that will grow, consider what will happen when additional rows are added. Table styles are designed to format table elements consistently, while manually applied borders may need review at the edges or around special rows. After adding data, check the first and last rows, subtotal lines, and print preview. If the table is frequently reused, a custom table style can save repeated formatting work.
Finally, remember that borders are not data. They do not change values, formulas, sorting, or filtering; they only affect appearance. Keep meaningful headings and totals in the cells themselves, and do not use a line alone to convey information that readers need to understand the data.
Frequently Asked Questions
How do I put a border around an entire Excel table?
Select the table’s cells, then choose Home > Font > Borders > Outside Borders. If you also want internal cell lines, choose All Borders instead.
Why are the lines in my Excel table not printing?
Those lines may be worksheet gridlines, which are controlled separately from borders. Apply cell borders for reliable printed edges, or enable Page Layout > Sheet Options > Gridlines > Print to print worksheet gridlines.
Can I change the color or thickness of Excel borders?
Yes. Open the Borders drop-down and choose a line color or style, or open Format Cells with Ctrl+1 on Windows or Command+1 on Mac and use the Border tab.
How do I remove borders without removing the table?
Select the affected cells and choose Home > Font > Borders > No Border. The table itself remains a table; its built-in style or visible worksheet gridlines may still show cell divisions.
Can a table style add borders automatically?
Yes. Table styles can format table elements, including headers and total rows. Choose a built-in style in Table Design, or create a custom table style in desktop Excel when you need specific border formatting.
Related
- Data Validation From a Table in Excel: Setup and Fixes
- Power Query Text to Columns: Split Data Step by Step
- Data Validation Framework: Design, Rules, and Examples
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Small Excel Sample Data: Examples to Copy and Use NowSmall Excel sample data is a short, clearly labeled set of rows you can paste into a worksheet…
- Data Validation and Verification in Excel ExplainedData validation checks whether data follows defined rules, while data verification checks whether it is accurate and matches…
- How to Archive Emails in New Outlook 365 Without DeletingTo archive emails in new Outlook 365, select the message or messages and choose Archive on the toolbar.…
- Make a Word Form Fillable but Not EditableTo make a Word form fillable but keep its layout and instructions from being edited, add form controls,…
- Excel Dropdown List: How to Create and Edit OneTo create a dropdown list in Excel for Microsoft 365 on Windows, put the choices in a worksheet…
- How to Add Reference Citations in Word, Step by StepTo add a reference citation in Microsoft Word, open the References tab, choose a citation style, then select…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.