To delete a line in Excel when you mean a whole row, click its numbered row heading, right-click, and choose Delete. You can also use Home > Cells > Delete > Delete Sheet Rows. This removes the row and shifts rows below it upward. If you only want to remove the values while keeping the row in place, clear the cells instead. Save a copy first if the data is important, and check which option you need before deleting.
What You’ll Need
- An Excel workbook open in Microsoft Excel for Microsoft 365 on Windows. The steps also work in many recent desktop versions.
- A clear idea of whether you want to remove an entire worksheet row, selected cells, or just the contents. These actions have different results.
- For important workbooks, a saved copy or a recent save point. You can usually reverse a deletion immediately with Undo, but a backup is safer if you continue editing afterward.
Step-by-Step
- Find the row you want to remove. Look at the numbered headings along the left edge of the worksheet. Each number identifies a worksheet row. Click a cell in the target row and check its contents before proceeding. If the sheet has a header row, confirm that you have not selected the headings instead of the data.
- Select the whole row. Click the row number at the far left. The entire row should become highlighted, including cells that look empty. To select adjacent rows, click the first row number and drag down or hold Shift while clicking the last row number. To select separate rows, hold Ctrl as you click each row number. On a Mac, use Command rather than Ctrl for selecting separate items.
- Delete the selected row. Right-click one of the selected row numbers and choose Delete. Alternatively, use the ribbon: select the row, then choose Home > Cells > Delete > Delete Sheet Rows. The row disappears, and the rows beneath it move upward. If the right-click menu offers several delete choices, use the row option rather than deleting only the cells in the selection.
- Use the keyboard if you prefer. With a cell in the row selected, press Ctrl+- (the minus key) on Windows to open the Delete dialog. Choose Entire row, then select OK. If you selected the row heading first, pressing Ctrl+- deletes that row directly in many Excel desktop setups. On Mac, use the Delete command from the ribbon or the row-heading context menu if the shortcut differs on your keyboard or Excel version.
- Delete more than one row when needed. Select the row headings for a continuous group, then right-click and choose Delete, or use the ribbon’s Delete Sheet Rows command. For nonadjacent rows, select each row heading while holding Ctrl on Windows or Command on Mac, then delete. Review the highlighted row numbers carefully: deleting a large selection can remove more data than intended.
- Check the worksheet after deletion. Confirm that the intended records are gone and that the rows below moved up as expected. Check nearby formulas, totals, charts, and references, especially if the removed row contained values used elsewhere. If the wrong row disappeared, press Ctrl+Z on Windows or Command+Z on Mac immediately.
In Excel for the web, select the row number, right-click it, and choose Delete Row or the equivalent row-delete command shown in the menu. Menu labels can vary slightly by interface. You can also look for row deletion on the Home ribbon. Keyboard shortcuts may be intercepted by the browser, so use the row heading’s menu if a shortcut does not work.
If the data is formatted as an Excel table, click a cell in the table row and use the table-row deletion command in the context menu, or select the worksheet row heading and delete the sheet row. Deleting a table row removes that record from the table and keeps the remaining table structure. Be sure you are removing a record rather than merely clearing its values.
Common Mistakes
- Pressing the Delete key and expecting the row to disappear. On Windows, the Delete key normally clears contents from selected cells; it does not remove the worksheet row. Use the row heading’s Delete command or Home > Cells > Delete > Delete Sheet Rows to remove the row itself.
- Deleting cells instead of the entire row. If you select a few cells and choose Delete, Excel may ask whether to shift cells left or up. Shifting only part of a record can misalign names, dates, and amounts across columns. If the whole record should go, select its row heading and delete the sheet row.
- Clearing a row when you meant to remove it. Clearing leaves an empty space in the worksheet and does not move lower rows up. That can be useful for a template or a form with fixed positions, but it is not the same as deleting a row.
- Selecting the wrong row number. A click on a cell does not always make it obvious which record is selected. Before deleting, verify the row number and scan a distinctive value in that row. If several rows are highlighted, check the full selection, not just the active cell.
- Deleting while a filter is active without checking what is selected. A filtered list can hide rows. A selection that appears to include only visible records may not match your intended set of worksheet rows. If hidden records must be preserved, inspect the selection and consider removing the filter or deleting records individually before using a bulk command.
Tips
- Choose the action based on the result you want. Delete a sheet row to close the gap and shift content below upward. Clear contents to keep the row position, formatting, and layout. In Excel, select the cells and use Home > Editing > Clear > Clear Contents when you want to remove entries but retain the cells.
- Use Undo promptly. If you delete the wrong row, use Ctrl+Z on Windows or Command+Z on Mac before making further changes. Undo reverses the most recent action, so additional edits can make it harder to restore the deletion cleanly.
- Consider formulas and references. Excel often adjusts formulas when rows are deleted, but a formula that depends on deleted cells can change or return an error such as
#REF!. Review totals and dependent sheets after removing rows. If the row is part of a source list for a chart or PivotTable, refresh or check those results as appropriate. - Filter first when you need to identify records. A filter can help you find rows matching a value, such as a status or date. Before deleting multiple results, verify whether the selection includes hidden rows. If you cannot confidently identify only the intended records, remove the filter and work through the row headings carefully.
- Keep a stable copy of source data. For a large cleanup, duplicate the worksheet or save a separate workbook before deleting many rows. This gives you a way to compare the original and edited lists if a selection or filter was wrong.
Troubleshooting
The row did not disappear. You may have pressed Delete, which clears cell contents, or selected cells rather than the row heading. Click the numbered row label and choose Delete, or use Home > Cells > Delete > Delete Sheet Rows. If the row is part of a protected sheet, see the protection guidance below.
The worksheet shifted or data no longer lines up. You may have deleted or shifted only a group of cells rather than the entire row. Undo immediately, then select the row number and delete the full row. If you intended to remove entries without moving other content, undo and use Clear Contents instead.
Excel will not let you delete the row. The worksheet may be protected. Open the Review tab and look for Unprotect Sheet. If protection is enabled, you may need the password or permission from the workbook owner. Shared or organization-managed files may also restrict editing; ask the owner for access rather than trying to bypass protection.
The wrong row was deleted. Press Ctrl+Z on Windows or Command+Z on Mac as soon as possible. If you have already closed the workbook or made many subsequent edits, check whether the file has version history or a separate backup. Do not assume that closing without saving will restore the earlier state, especially if AutoSave is on.
A formula, chart, or total changed unexpectedly. Deleting a row can affect references to cells in that row. Use Undo if the change is not wanted, then inspect the formulas and data source before trying again. If a formula now contains #REF!, it may refer to a cell or range that no longer exists; repair the reference using the correct remaining data. Recheck totals rather than assuming Excel preserved the intended calculation.
The row is hidden or hard to locate. Check for an active filter or hidden rows. Clear the filter temporarily, or select the rows around the gap and use Home > Cells > Format > Hide & Unhide > Unhide Rows if rows were manually hidden. Once the target is visible, confirm its contents before deleting it.
Frequently Asked Questions
Does deleting a row remove the data permanently?
It removes the row from the current worksheet and shifts rows below upward. You can usually restore it with Undo right away, but the deletion is not a substitute for keeping a backup. If the workbook has been saved and edited further, recovery may depend on version history or another copy.
How do I delete a row without shifting other cells up?
You cannot remove a whole worksheet row without shifting the rows below it upward; that movement is what row deletion does. To leave the layout in place, select the cells in the row and choose Home > Editing > Clear > Clear Contents. This removes values but keeps the row and its formatting.
How do I delete several rows at once?
Select their row numbers, then right-click and choose Delete. Select adjacent rows by dragging across their headings or using Shift; select separate rows with Ctrl on Windows or Command on Mac. Review the highlighted selection before deleting, particularly if filters or hidden rows are involved.
Can I delete a row from an Excel table?
Yes. Use the table row’s context menu to delete the table row, or select the worksheet row heading and delete the sheet row. The table adjusts as rows are removed. If you only clear the values, the blank table row remains, so choose deletion when the record itself should be removed.
How do I remove a line break inside a cell?
A line break inside a cell is different from a worksheet row. Click the cell and edit its text, then remove the break between the words; in many Windows setups, Alt+Enter inserts a line break while editing. You can also use Find and Replace for line breaks, but handle that separately from deleting a worksheet row so other records are not affected.
Can I delete rows in Excel for Mac or the web?
Yes. On Mac, select the row heading and use its context menu or the Home ribbon; shortcut behavior can differ by keyboard and Excel version. In Excel for the web, select the row number and use the row-delete command in the context menu or ribbon. If a keyboard shortcut behaves differently, use the menu to confirm the action.
Related
- How to Copy and Paste Bullet Points in Excel Cells
- How to Copy and Paste a Whole Column in Excel Easily
- How to Copy a Whole Column in Excel
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Change Indent in Word Online: Steps, Tips, and FixesTo change an indent in Word Online, select the paragraph or paragraphs, then choose Home > Increase Indent…
- How to Animate a Text Box in PowerPointTo animate a text box in PowerPoint, select its border, open the Animations tab, choose an effect, then…
- Excel File With Table Filters: How to Add and Use ThemYes—an Excel file can use table filters to show only the rows that match criteria, without deleting or…
- Excel Remove Table, Keep Data? Steps and EffectsYes. In Excel for Microsoft 365 on Windows, select a cell in the table, choose Table Design >…
- How to Add a Drop-Down List in Excel: Step-by-StepTo add a drop-down list in Excel for Microsoft 365 on Windows, put the choices in cells, select…
- Inventory Spreadsheet Template for Google SheetsFor an inventory spreadsheet, use Google Sheets rather than Google Docs: Sheets is Google’s spreadsheet app, while Docs…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.