How to Fix Borders in Excel: Quick, Reliable Steps

Errors & fixes · Updated November 3, 2026

How to Fix Borders in Excel: Quick, Reliable Steps

To fix a border in Excel, select the affected cell or range, go to Home > Borders, and choose the edge or border style you want. For more control, open Format Cells with Ctrl+1, select the Border tab, and adjust the preview. First check whether you are seeing cell borders or just worksheet gridlines; they are different.

What You’ll Need

  • An Excel workbook you can edit. If the sheet contains important data, save a copy before changing formatting.
  • The address of the affected cell or range, if you know it. You can also select the cells directly on the worksheet.
  • Excel for Microsoft 365 on Windows for the steps below. Excel for Mac has similar border controls, though keyboard shortcuts differ; Excel for the web may show a simplified Format Cells dialog.

Step-by-Step

  1. Select the cells that need fixing. Click one cell to change its border, or drag across a range to apply the same formatting to multiple cells. To select a whole column or row, click its letter or number heading. If only one side of a cell looks wrong, select that cell and change just that edge. When several cells are selected, remember that applying an outline affects the outside of the selection, while inside borders affect the divisions between selected cells.
  2. Decide whether the line is a border or a gridline. Gridlines are the faint worksheet guides Excel displays around cells; they are not cell formatting. To show or hide them, use View > Gridlines. A border is a format applied to one or more cell edges and can have a custom color and weight. If a line disappears when you turn off gridlines, it was not a border. If it remains, inspect the cell border settings.
  3. Open the Borders menu. On the Home tab, find the Font group and click the arrow next to the Borders button. Choose a preset such as Bottom Border, Top Border, All Borders, or Outside Borders. These choices apply immediately to the selected cells. Use No Border to remove borders from the selection. Avoid choosing a different preset repeatedly without checking the result, as each choice can replace or change the selected edges.
  4. Use Format Cells for a precise repair. With the cells selected, press Ctrl+1 on Windows and choose the Border tab. You can also open the Format Cells dialog from the Borders menu if that option is available. In the dialog, select a line style and color, then click the sides of the small preview box to turn those edges on or off. Use the preview to confirm the left, right, top, bottom, and internal lines before clicking OK. This is the most reliable way to repair a single unusual edge or set a specific color and thickness.
  5. Apply the intended line style before choosing the edges. In the Border tab, select the desired line weight or pattern first. Then click each edge you want to draw in the preview. If you pick a style after applying edges, Excel may not change the existing edges as expected; click the preview edges again with the new style selected. Choose a visible color that contrasts with the cell fill. A white border on a white background can be present but effectively invisible.
  6. Remove only the unwanted line when possible. If one edge is doubled, too thick, or in the wrong place, select the affected cells and open the Border tab. Click that specific edge in the preview to switch it off, leaving the other edges intact. If you cannot identify which cell contributes the line, inspect the cells on both sides of it: the visible boundary may be formatted on either adjacent cell. For a clean restart on a small range, choose No Border first, then add back only the edges you need.
  7. Check neighboring cells and merged cells. A border can appear continuous across a row because adjacent cells each have a border on their shared edge. Fixing just one cell may leave a second line in place. Select the whole affected block and inspect the preview, or check the cells on both sides of the boundary. Merged cells can also make border placement less obvious: select the merged area as a whole and set its outside edges. If needed, use Home > Merge & Center to inspect the merge options, but do not unmerge cells unless you understand how it may affect their contents.
  8. Confirm the change in the right view. Click another cell to clear the selection and inspect the border without the selection outline. If the workbook is intended for printing, use File > Print to check print preview. Cell borders normally print; worksheet gridlines do not print unless enabled through the sheet options. Do not add borders just to make gridlines print if the goal is to show the entire worksheet grid; use the gridline print setting instead.

On Mac: The ribbon is similar, but use Command+1 to open Format Cells instead of Ctrl+1. You can also use the Home tab’s Borders menu. In Excel for the web, look for the Borders control on Home; some detailed line-style and dialog options can differ from the desktop application.

Common Mistakes

  • Confusing gridlines with borders. Hiding gridlines does not remove cell borders, and turning gridlines on does not restore a missing border. Identify which kind of line you are dealing with before changing formatting.
  • Applying All Borders when you only need an outline. All Borders puts lines between cells as well as around the outside. For a simple frame, choose Outside Borders. For a table that needs both a frame and dividers, select All Borders deliberately.
  • Using Clear All to remove a border. Clear All removes more than borders, including other cell formatting and contents. Use No Border from the Borders menu or turn off a specific edge in Format Cells.
  • Formatting the wrong range. A border change applies to the current selection, which may include extra rows or omit part of the table. Check the highlighted cells before choosing a border, especially after selecting a range by dragging.
  • Forgetting the line color or weight. A border can seem missing if it is white, very pale, or extremely thin. Inspect its color and style in Format Cells rather than repeatedly applying the same preset.

Tips

  • For a simple, consistent data table, apply All Borders to the selected table range, then use a stronger outside edge if you want the perimeter to stand out.
  • When creating a report, decide on a small set of border styles—for example, thin internal lines and a medium outline—and reuse them. A consistent design is easier to read than many different weights and colors.
  • To format nonadjacent ranges, hold Ctrl while selecting additional cells or ranges on Windows, then choose the border. Be careful: a preset applies to every selected area, so inspect the result before continuing.
  • If a specific worksheet needs gridlines when printed, select it and use Page Layout > Sheet Options > Gridlines > Print. This controls gridline printing, not cell borders. Check print preview because page scaling can make thin lines difficult to see.
  • Save after confirming the change. If you are unsure whether a style is used elsewhere, test it on a copy of the sheet or workbook before applying it to a large range.

Troubleshooting

The border menu is unavailable or disabled: The worksheet may be protected, or you may be viewing the workbook in a mode that does not allow formatting. Check Review > Protect Sheet. If the sheet is protected, ask the workbook owner for permission or the password before changing protection settings. Do not try to bypass protection. Also check whether the workbook is read-only or opened with editing disabled.

The border looks unchanged after applying a preset: Click outside the selection to remove the selection outline, then inspect the cells again. If the line still looks wrong, open Format Cells and check the actual edge, color, and weight. Verify that the intended range is selected and that you are not looking at gridlines. If the line belongs to a neighboring cell, correct that adjacent cell too.

A border keeps returning or looks different from the setting: Conditional formatting can change the displayed appearance based on cell values. Select the affected cell and go to Home > Conditional Formatting > Manage Rules. Set the rules view to the current worksheet if necessary, then inspect rules that apply to the range. Edit or remove only the rule responsible for the border; deleting unrelated rules can alter other formatting. Table styles can also affect the appearance of a formatted table, so check the table’s style on the Table Design tab if the cells are part of an Excel table.

The border appears on screen but not on paper or in a PDF: Open File > Print and check the preview. Borders should print as cell formatting, but very light or thin lines may be hard to see. Increase the line weight or choose a darker color if needed. If you expected worksheet gridlines instead, enable their print option under Page Layout > Sheet Options > Gridlines > Print. Also review page scaling and print area settings, which can make a border fall outside the printed range.

You cannot remove a line between two cells: The line may be the shared edge of two separately formatted cells, or one cell may be part of a merged range. Select and inspect both cells bordering the line. In Format Cells, turn off the relevant edge for each cell if necessary. If it is a merged range, select the entire merged area and adjust its border as a unit.

Frequently Asked Questions

How do I remove all borders from selected cells?
Choose the cells, then use Home > Borders > No Border. This removes cell borders from the selection without deleting its values. It does not turn off worksheet gridlines.

How do I add a border around a whole table without lines inside it?
Select the table range and choose Home > Borders > Outside Borders. If you also need lines between rows or columns, choose All Borders instead.

Why does my border disappear when I hide gridlines?
A true cell border should remain visible when gridlines are hidden. If the line disappears, it was a worksheet gridline rather than a border. Add a border from the Home tab if you need that line to remain visible or print.

Can I change only the bottom border?
Yes. Select the cell or range and choose Home > Borders > Bottom Border. For a custom color or weight, use Format Cells, select the Border tab, choose the style and color, and click the bottom edge in the preview.

Why do I see a border that is not shown in Format Cells?
Check conditional formatting rules and table styles, which can affect the displayed formatting. Also inspect adjacent cells, since a line can be drawn by the cell on the other side of the boundary.

Do borders print by default?
Cell borders generally print. Worksheet gridlines are separate and are not printed by default; enable Page Layout > Sheet Options > Gridlines > Print if you want gridlines on the page.

Related

Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.

More in Errors & fixes

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

Spotted an error in this guide? Let us know.