How to Delete Lines in Excel: Rows, Blank Lines, and More
Deleting lines in Excel sounds simple — and often it is. But depending on what you mean by "lines," you might be dealing with rows of data, blank rows scattered through a spreadsheet, gridlines, or drawn lines on a chart. Each situation has its own method, and using the wrong one can cause frustration or accidentally remove data you meant to keep.
Here's a clear breakdown of every common scenario.
Deleting a Single Row in Excel
The most common task is removing a full row of data.
- Click the row number on the left side of the spreadsheet to select the entire row.
- Right-click the selected row number.
- Choose Delete from the context menu.
The row disappears, and everything below it shifts up automatically.
You can also use the keyboard shortcut: select the row, then press Ctrl + Minus (–) on Windows or Command + Minus (–) on Mac.
⚠️ Don't press the Backspace or Delete key on your keyboard after selecting a row — that clears the cell contents without removing the row itself.
Deleting Multiple Rows at Once
If you need to remove several rows, you don't have to delete them one at a time.
For consecutive rows:
- Click the first row number, hold Shift, then click the last row number to select a range.
- Right-click and choose Delete.
For non-consecutive rows:
- Click the first row number, then hold Ctrl (Windows) or Command (Mac) while clicking each additional row number.
- Right-click and choose Delete.
All selected rows are removed in one action, which is far more efficient than repeating the process manually.
Deleting Blank Rows from a Dataset 🧹
One of the most frustrating situations in Excel is a spreadsheet with empty rows scattered throughout your data. Deleting them manually row by row is tedious — and there are smarter approaches.
Method 1: Go To Special
- Select the range of data where blank rows exist (or select the whole sheet with Ctrl + A).
- Press Ctrl + G to open the Go To dialog, then click Special.
- Choose Blanks and click OK.
- Excel highlights all blank cells. Right-click any highlighted cell and choose Delete.
- Select Entire Row and click OK.
This works well when your blank rows are truly empty across every column.
Method 2: Filter and Delete
- Select your data range and turn on filters with Ctrl + Shift + L.
- Click the dropdown arrow on any column header.
- Uncheck everything except (Blanks).
- Select all the visible blank rows, right-click, and choose Delete Row.
- Turn the filter off again with Ctrl + Shift + L.
This method gives you more control, especially if some rows are only partially blank.
Method 3: Sort to Group Blanks Together
Sort your data by a key column. Blank rows sink to the bottom (or rise to the top), making them easy to select and delete as a group. This works fastest when the row order doesn't matter to you.
Deleting Lines That Aren't Rows
The word "line" sometimes means something other than a data row.
Gridlines
Gridlines are the faint gray borders you see between cells. They aren't real objects — they're just a display setting. To turn them off:
- Go to View → uncheck Gridlines.
You can't "delete" a single gridline; it's all or nothing per sheet. If you want borders on specific cells only, use Format Cells → Border instead.
Drawn Lines or Shapes
If someone inserted a line object into the spreadsheet (using Insert → Shapes), you can click directly on that line to select it and press Delete to remove it.
If you can't see or click the line, use Find & Select → Selection Pane (under the Home tab) to locate and delete any shapes or drawing objects on the sheet.
Lines in Charts
For a line in a chart (like a trend line or series line), click the chart to activate it, click the specific line you want to remove, and press Delete. If it's a trendline, right-click it and choose Delete Trendline.
What Affects Which Method Works for You
| Situation | Best Method |
|---|---|
| Single row of data | Select row → Right-click → Delete |
| Multiple adjacent rows | Shift-select rows → Delete |
| Scattered blank rows | Go To Special → Blanks → Delete |
| Many blanks with partial data | Filter method |
| Drawn line or shape | Click object → Delete key |
| Gridlines | View tab → Gridlines toggle |
| Chart trendlines | Right-click → Delete Trendline |
Variables That Change the Experience
A few factors affect which approach works smoothest for you:
- Excel version — Older versions of Excel (pre-2016) have slight differences in menu layout and available features. The core delete row function works the same, but the Selection Pane and some filter options may look different.
- File type —
.xlsxfiles behave as expected. Legacy.xlsfiles or CSV files opened in Excel sometimes behave differently with certain delete operations. - Protected sheets — If a sheet is password-protected, row deletion may be disabled. You'll need to unprotect the sheet first under Review → Unprotect Sheet.
- Shared workbooks — In a co-authored workbook (Excel 365, OneDrive), some structural changes like deleting rows can conflict with another user's edits in real time.
- Amount of data — On very large datasets (tens of thousands of rows), the Go To Special method can be slow. Filtering or sorting first tends to be faster.
How smoothly the process goes — and which method fits best — depends heavily on what your spreadsheet actually contains and how it's structured. 🗂️