The fastest way to delete a line in Excel

Right-click on the row or column number on the left or top edge of your spreadsheet, then click Delete. That removes the entire line and shifts everything below or to the right up or left to fill the gap. If you need to delete multiple rows or columns at once, click the first one, hold Shift, and click the last one — then right-click and delete them all together.

If you want to delete only the content inside cells without removing the row or column itself, select the cells, press Delete, and the data clears while the empty row stays in place. This matters when you have formulas or formatting you want to keep.

Key Takeaways

  • Right-click a row or column number and select Delete to remove the entire line and shift everything else to fill the space.
  • Hold Shift and click multiple row or column numbers to delete several at once instead of one by one.
  • Press Delete on selected cells to clear only the data, leaving the empty row or column in place.
  • Deleted rows and columns cannot be recovered after you save the file, so use Ctrl+Z when ready if you delete by mistake.
  • The Delete key clears content; the Delete command removes the structure itself.

Deleting a single row or column

Click the row number on the left side (1, 2, 3, and so on) or the column letter at the top (A, B, C, and so on) to select the entire line. The row or column will highlight in blue. Right-click on the highlighted number or letter and a menu appears — click Delete at the top of that menu.

Excel removes that row or column completely. Everything below a deleted row moves up one space. Everything to the right of a deleted column moves left one space. If you have formulas that reference cells in the deleted row or column, those formulas will show an error until you fix them.

Deleting multiple rows or columns at once

Click the first row or column you want to delete. Then hold down Shift on your keyboard and click the last row or column in the range. All the rows or columns between them, including the first and last, will highlight in blue.

Right-click anywhere on the highlighted area and select Delete. All selected rows or columns disappear at once, and the remaining rows or columns shift to fill the space. This is much faster than deleting them one at a time, especially if you need to remove 10 or 20 rows.

Clearing data without removing the row or column

Sometimes you want to erase what is inside cells but keep the row or column structure. Click the cells you want to clear, then press the Delete key on your keyboard. The data inside those cells disappears, but the row or column stays where it is.

This is useful when you have a spreadsheet with a specific layout — for example, a budget template where certain rows are meant to stay empty, or a table where you want to preserve the column headers and formatting. Clearing content is also safer than deleting rows, because you can undo it more easily if you change your mind.

Undoing a deletion and recovering lost data

If you delete a row or column by mistake, press Ctrl+Z on your keyboard when ready. Excel will undo the deletion and bring the row or column back. You can undo multiple deletions in a row by pressing Ctrl+Z several times.

This works only before you save the file. Once you close and save your spreadsheet, deleted rows and columns cannot be recovered. If you realize the mistake after saving, you will have to retype the data or restore from a backup copy if you have one. For this reason, it is worth saving a copy of important spreadsheets before you start making large deletions.

Deleting rows or columns with filters or hidden content

If you have applied a filter to your spreadsheet and some rows are hidden, deleting a visible row will only delete that row — the hidden rows stay in place. This can be confusing if you think you are deleting a larger block of data. Before you delete, check whether any rows are hidden by looking for a blue row number (which means that row is filtered) or a gap in the numbering.

If you want to delete all visible rows in a filtered view, select them all first by clicking the first visible row number, holding Shift, and clicking the last visible row number. Then right-click and delete. The hidden rows will remain. To delete hidden rows as well, you must remove the filter first, select all the rows you want to delete, and then delete them.

What happens to formulas when you delete rows or columns

If other cells in your spreadsheet contain formulas that reference a deleted row or column, those formulas will break. The cell will display #REF! as an error. For example, if cell D5 contains the formula =SUM(A1:A10) and you delete rows 8 through 10, the formula still works but now only adds rows 1 through 7.

If you delete a row that a formula directly references — like deleting row 5 when a formula says =A5 — that formula will show #REF! and you will need to fix it by pointing it to a different cell or removing the formula. Before deleting rows or columns in a spreadsheet with many formulas, it is worth checking which cells depend on the data you are about to remove.

Frequently Asked Questions

Can I delete a row without deleting the entire row?

Yes. Select the cells in that row that you want to clear, then press Delete. The cells empty but the row stays. If you want to remove the row structure itself, you must right-click the row number and select Delete.

What is the difference between Delete and Clear?

Delete removes the row or column entirely and shifts everything else to fill the space. Clear (pressing Delete) removes only the content inside cells, leaving the structure in place. Use Delete for the row or column number; use the Delete key for cell contents.

Can I undo a deletion after I save the file?

No. Once you save and close the file, deleted rows and columns are gone permanently. Press Ctrl+Z when ready after a mistake to undo, before saving. Keep backup copies of important spreadsheets.

What happens if I delete a row that contains a formula other cells depend on?

Cells that reference the deleted row will show #REF! error. You will need to fix those formulas by pointing them to different cells or removing them. Check your spreadsheet for formulas before deleting rows that other calculations use.

Can I delete multiple non-consecutive rows at once?

Not with a single right-click. You must delete them one at a time, or select them by holding Ctrl and clicking each row number, then right-click and delete. Holding Ctrl lets you pick rows that are not next to each other.