How to Remove Lines in Excel

To remove the faint lines between cells in Excel, open the View tab and clear the Gridlines check box in the Show group. If the lines are darker or only around certain cells, they are borders: select the cells, then choose Home > Borders > No Border. Dashed lines that run across the sheet are page breaks, which you turn off in File > Options > Advanced.

Applies to: Excel for Microsoft 365, Excel 2024, Excel 2021, Excel 2019 and Excel 2016 for Windows, with a note for Excel for Mac. Checked against Microsoft Support on October 7, 2026.

Work out which kind of line you have

Excel has several features that all look like “lines,” and each one is removed in a different place. Match what you see to the table before you change anything.

What you see What it is Where to remove it
Faint lines between every cell on the sheet Gridlines View tab, Show group, Gridlines check box
Darker, colored or thicker lines around some cells Cell borders Home tab, Font group, Borders, No Border
Dashed lines that cut across rows or columns Page breaks File, Options, Advanced, Show page breaks
A line that sits on top of the cells and can be dragged A drawn shape Select it and press Delete
Lines inside a chart Chart gridlines Add Chart Element, Gridlines

Hide gridlines on a worksheet

Gridlines are the faint lines that Excel shows between cells. They belong to the whole worksheet, so you cannot hide them for only a few cells.

  1. Click the sheet tab at the bottom of the window for the worksheet you want to change. To change several sheets at once, select all of their tabs.
  2. Open the View tab on the ribbon and find the Show group.
  3. Clear the Gridlines check box. The faint lines disappear from the sheet right away, and your data and formatting stay the same.
Illustration of the path to hide gridlines in Excel: View tab, Show group, Gridlines check box
Illustration: the path to the Gridlines check box on the View tab in Excel.

If you selected more than one sheet, the word Group appears in the title bar. When you are done, right-click one of the selected sheet tabs and choose Ungroup Sheets so that later edits affect only one sheet.

Gridlines do not print unless you ask for them. If they appear on paper, open the Page Layout tab and, in the Sheet Options group, clear the Print check box under Gridlines. Microsoft documents both settings in Show or hide gridlines on a worksheet.

Remove cell borders

Borders are formatting that someone applied to specific cells. Unlike gridlines, they print, and they stay in place when gridlines are hidden.

  1. Select the cells that have the border you want to remove.
  2. On the Home tab, in the Font group, click the arrow next to the Borders button.
  3. Choose No Border. Every border on the selected cells is removed.

To take away only one edge and keep the rest, click the Borders arrow, choose Erase Border, and then click the border lines you want to clear. The steps are covered in Microsoft’s guide to applying or removing cell borders.

If you want the cells stripped back to plain, with no borders, fill color or font formatting, select them and choose Home > Clear (in the Editing group) > Clear Formats. This removes all formatting from the selection, not just the borders, so use it only when you do not need the number formats or colors. Your data is not deleted.

Hide dashed page break lines

After you work in Page Break Preview and return to Normal view, Excel can keep showing dashed lines on the sheet. They show where one printed page ends and the next begins. In Page Break Preview, dashed lines are breaks Excel added automatically and solid lines are breaks someone added by hand.

  1. If the sheet is in Page Break Preview, go to the View tab and, in the Workbook Views group, click Normal.
  2. Click the File tab, then Options.
  3. Select the Advanced category and scroll to Display options for this worksheet.
  4. Clear the Show page breaks check box and confirm the change. The dashed lines are hidden on that worksheet.

This setting only hides the lines. The pages still break in the same places when you print. The setting is stored per worksheet, so repeat it on other sheets that show the lines.

In Excel for Mac, click Excel > Preferences > View, and under Show in Workbook, clear the Page breaks check box.

To remove page breaks that were added by hand, go to the Page Layout tab and, in the Page Setup group, click Breaks > Reset All Page Breaks. Excel’s automatic breaks cannot be deleted. Our guide on how to remove all page breaks in Excel walks through that process, and Microsoft covers it in Insert, move, or delete page breaks in a worksheet.

Delete a drawn line or shape

A line that was drawn as a shape floats above the cells. It does not move when you change borders or gridlines.

  1. Click the line itself to select it.
  2. Press Delete. To remove several at once, hold Ctrl while you click each one, then press Delete.

If the line is hard to click, open the Home tab and, in the Editing group, choose Find & Select > Selection Pane (or press Alt+F10). The pane lists every object on the sheet. Select the line’s name in the list, then delete it.

Remove gridlines from a chart

Lines inside a chart are chart elements, so worksheet settings do not affect them. Click anywhere in the chart. On the Design tab, in the Chart Layouts group, click Add Chart Element, point to Gridlines, and click the gridline option you want to hide. You can also click the chart’s horizontal or vertical gridlines to select them and press Delete. The options listed depend on the chart type.

Confirm it worked or bring the lines back

  • Gridlines: the sheet looks like a blank page. Select the Gridlines check box on the View tab again to restore them.
  • Borders: the cells show only gridlines, if gridlines are on. To put a border back, select the cells and pick a style from the Borders menu.
  • Page breaks: the dashed lines are gone in Normal view. Select Show page breaks again to see them.

Troubleshooting

Lines are still there after clearing Gridlines

What remains are borders, page breaks or shapes. Work through the sections above in order.

Gridlines are missing from only some cells

Those cells have a fill color, which covers gridlines. A white fill hides them as well. Select the cells, click the arrow next to Fill Color in the Font group on the Home tab, and choose No Fill.

The check boxes in Sheet Options are dimmed

Microsoft notes that the Sheet Options check boxes can appear dimmed when a chart, image or other object is selected. Click any cell to deselect the object and try again.

Borders come back after pasting

Copied cells bring their formatting with them, including borders. Remove them with No Border after pasting, or use Clear Formats on the pasted range.

You cannot change formatting at all

If the border and formatting commands are unavailable, the sheet may be protected or the workbook may be open as read-only. In a work or school file, ask the owner for edit access or for the sheet to be unprotected.

Frequently asked questions

Can I hide gridlines in only part of a worksheet?

No. Microsoft states that gridlines always apply to the whole worksheet or workbook and cannot be applied to specific cells or ranges. To make part of a sheet look blank, give those cells a white fill color. To show lines in only one area, hide gridlines and add borders to that area.

What is the difference between gridlines and borders?

Gridlines are a display setting for the whole sheet and do not print by default. Borders are formatting on individual cells, can be styled, and do print.

Does hiding gridlines delete any data?

No. Hiding gridlines, removing borders and hiding page break lines change only how the sheet looks. The contents of the cells are not touched.

Why are there dashed lines across my sheet?

They are automatic page breaks, which mark where each printed page ends. They can stay on screen in Normal view after you have used Page Break Preview, and they remain until you clear Show page breaks for that worksheet.

Can I change the gridline color instead of hiding them?

Yes. Go to File > Options > Advanced, and under Display options for this worksheet, choose a color next to Gridline color.

Once the sheet is clean, check File > Print to see how the printed pages will look before you share or print the workbook.

Get Our Free Newsletter

How-to guides and tech deals

You may opt out at any time.
Read our Privacy Policy