In Excel: select the whole rows by their row numbers, right-click the selection and choose Delete — the rows below shift up to close the gap; the keyboard shortcut is Ctrl+Minus.
On this page7
Click a row number and drag (or Ctrl-click each header) to select the whole rows you want to delete.
Right-click anywhere in the highlighted rows and choose Delete, or use Home ▸ Delete ▸ Delete Sheet Rows.
The rows are removed and everything below shifts up to close the gap.
For speed, select the row(s) and press Ctrl+Minus instead of right-clicking.
What this does
Deleting rows removes the selected rows entirely — their data is gone and everything below moves up to fill the space, so there is no empty gap left behind. You select whole rows by their row-number headers, then right-click ▸ Delete or use Home ▸ Delete ▸ Delete Sheet Rows. Ctrl+Minus does the same from the keyboard. To delete several rows that are not next to each other, hold Ctrl and click each row number first, then delete them all in one step. Because the rows physically disappear, any formula that pointed at a deleted row breaks with #REF!, so check totals that referenced the removed range. Most people learn this as a sequence of clicks and forget it by next week; learning it as a pattern instead is what lets you apply it to the next, slightly different version of the problem without starting from scratch. That is the difference this page is trying to make. The difference between a quick fix and a sheet you can trust is the extra minute you spend validating “delete extra lines in excel”. Start on a copy or a tiny sample, keep the affected cells visible, and compare the result with the tool above before you touch the real workbook. When this is a ribbon command, the selection matters more than the button: confirm the range, apply the command, then spot-check the output before saving. The point is a data step that keeps your analysis trustworthy, but the practical win is that someone else can open the file and understand what happened without asking you.
A worked example
You want to drop rows 5, 6 and 7. Click row header 5 and drag down to row 7 to select all three whole rows, right-click anywhere in the selection and choose Delete — rows 5 to 7 vanish and the data that was in row 8 onward moves up to fill rows 5, 6, 7 and beyond. For a quick keyboard version, select the rows and press Ctrl+Minus. Deleting rows is how you clear out records you no longer need without leaving holes in the data — the sheet packs back together as the rows below move up. Unlike clearing cell contents, the rows physically go away, so the layout stays tight and continuous. If this is something you do often, add the command to the Quick Access Toolbar (right-click it on the ribbon and choose Add to Quick Access Toolbar) or learn its shortcut, so next time it is one click instead of a hunt through the menus.
In Google Sheets
This is a command rather than a formula, so there is no syntax to carry over. Google Sheets arranges its commands in menus across the top instead of a ribbon, names some of them differently and does not have every Excel command — look for the equivalent in the Sheets menus or its help before assuming the steps match. Nothing on this page is behind a login or a download: the exact answer is at the top, and the detail below it is there for when you need it. That is the whole promise here — the answer first, and just enough context to make it stick. Here is the takeaway for “delete extra lines in excel”: follow the steps at the top, check the result on the sheet itself, and keep undo in mind while you experiment. Done once deliberately, it becomes something you do from memory in Excel rather than something you search for again.
Common mistakes
- Selecting cells instead of whole row numbers, which opens the Delete dialog asking how to shift the surrounding cells.
- Forgetting that deleting a row a formula points at throws
#REF!— check totals that referenced the removed range. - Pressing Delete (the key) expecting the rows to disappear — that only clears the contents; use right-click ▸ Delete or Ctrl+Minus to remove the rows themselves.
- Deleting scattered rows one by one instead of Ctrl-clicking every row number first and removing them in a single step.
Frequently asked questions
What is the shortcut to delete a row?
Select the whole row and press Ctrl+Minus (Ctrl and the - key). If you selected cells rather than a whole row, the same shortcut opens the Delete dialog so you can choose Entire row.
How do I delete several non-adjacent rows at once?
Hold Ctrl and click each row number you want, then right-click and Delete (or press Ctrl+Minus). All the selected rows are removed together and the remaining rows close up.
Why did my formulas break after deleting a row?
A formula that referenced a deleted row has nothing left to point at, so it returns #REF!. Rebuild the reference around the rows that remain, or delete inside the referenced range so it shrinks cleanly.