The fastest way to delete a line in Excel

To delete a row or column in Excel, right-click on the row number or column letter you want to remove, then select Delete from the menu that appears. The row or column vanishes immediately, and everything below or to the right shifts 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.

Excel also lets you delete rows and columns from the Home tab. Select the row or column, go to the Home tab at the top, click the dropdown arrow next to Delete, and choose either Delete Sheet Rows or Delete Sheet Columns. Both methods do the same thing; use whichever feels faster to you.

Key Takeaways

  • Right-click the row number or column letter and select Delete to remove it instantly.
  • Select multiple rows or columns by clicking the first, holding Shift, and clicking the last before deleting.
  • Deleting a row or column shifts everything below or to the right upward or leftward to close the gap.
  • You can undo a deletion by pressing Ctrl+Z (or Cmd+Z on Mac) immediately after.

Selecting a single row or column to delete

Click the row number on the left side of the spreadsheet to select an entire row. The whole row highlights in blue. For a column, click the column letter at the top — A, B, C, and so on. The entire column highlights. Once the row or column is selected, right-click anywhere in the highlighted area and choose Delete.

If you want to use the menu instead, select the row or column, then click the Home tab at the top of the screen. Look for the Delete button in the toolbar (it usually has a small dropdown arrow next to it). Click the arrow and choose Delete Sheet Rows or Delete Sheet Columns depending on what you selected.

Deleting multiple rows or columns at once

To delete several rows or columns in one action, select them first. Click the row number or column letter of the first one you want to delete. Then hold down the Shift key and click the row number or column letter of the last one. All the rows or columns between them (and including them) will highlight in blue.

Once they are all selected, right-click and choose Delete, or use the Home tab method described above. All selected rows or columns disappear at the same time. This is much faster than deleting them one at a time if you need to remove ten rows or more.

What happens to your data when you delete

When you delete a row, everything below it moves up one row. When you delete a column, everything to the right of it moves left one column. If you had formulas that referenced cells in the deleted row or column, those formulas will show an error (usually #REF!) because the cells they pointed to no longer exist.

For this reason, check your spreadsheet for formulas before deleting rows or columns. If you delete something by mistake, press Ctrl+Z (or Cmd+Z on a Mac) immediately to undo. Excel keeps a history of your recent actions, so you can undo multiple deletions if you catch the mistake quickly enough.

The difference between deleting and clearing

Deleting a row or column removes it entirely from the spreadsheet and shifts everything else over. Clearing a row or column, by contrast, erases the contents but leaves the empty row or column in place. If you only want to erase the data without changing the structure of your spreadsheet, clearing is the right choice.

To clear instead of delete, select the row or column, right-click, and choose Clear Contents. The row or column stays where it is, but everything in it disappears. Use this when you want to keep the layout of your spreadsheet the same but remove specific data.

Deleting rows or columns in Excel Online

Excel Online (the browser version you access through Microsoft 365 or OneDrive) works almost the same way. Right-click the row number or column letter and select Delete from the menu. The row or column is removed and everything shifts to fill the gap, just as it does in the desktop version.

If the right-click menu does not appear, try clicking the row number or column letter first to select it, then right-click. Some browsers or devices require the selection step before the context menu shows up. The Home tab method also works in Excel Online if you prefer using the toolbar instead.

Frequently Asked Questions

Can I undo a deletion after I close the file?

No. The undo history is only available while the file is open in your current session. Once you close the file and reopen it, the undo history is gone. If you deleted something important, check if Excel created a backup or recovery file, but the safest approach is to undo immediately after you delete.

What if I delete a row by mistake and I already saved the file?

If you saved after the deletion, the undo history is lost. Check your file's version history if you are using OneDrive or SharePoint — both services keep older versions of files for a period of time. Right-click the file in OneDrive or SharePoint and look for Version history to restore an earlier copy.

Does deleting a row affect formulas in other sheets?

Yes. If another sheet has a formula that references a cell in the deleted row, that formula will show #REF! error. Before deleting rows that other sheets depend on, search your workbook for formulas that reference those rows. You can use Find & Replace to search for cell references.

Can I delete a row without shifting everything up?

Not with the standard delete function. If you want to remove a row but keep everything else in the same position, use Clear Contents instead of Delete. This erases the data but leaves the empty row in place so nothing shifts.