The Feast

Home cooking recipes for everyday dinners and easy entertaining

Shortcut Recipe: Remove Specific Rows in Excel

· 4 min read · Dinners

This shortcut recipe shows you the fastest way to delete specific rows in Excel—whether you're removing duplicates, blank cells, or rows that match a certain value. You'll learn keyboard shortcuts, filters, and a quick Go To Special trick that saves minutes on large spreadsheets.

Ingredients

  • 1 Excel workbook with the data you want to clean
  • 1 column that identifies the rows to remove (e.g., status, category)
  • Optional: a list of values to delete (e.g., "closed", "N/A")
  • Ctrl key (Windows) or Cmd key (Mac)
  • Right-click mouse or trackpad

Instructions

  1. Back up your data first. Copy the sheet (right-click the tab > Move or Copy > Create a copy) so you can undo mistakes.
  2. Select the entire data range. Click any cell inside your data and press Ctrl + A (Windows) or Cmd + A (Mac) to select all contiguous data.
  3. Turn on filters. Go to the Data tab and click the Filter button (or press Ctrl + Shift + L). You'll see dropdown arrows in your header row.
  4. Filter for the rows you want to delete. Click the dropdown arrow in the column that contains the criteria (e.g., "Status"). Uncheck Select All, then check only the values you want to remove (e.g., "Closed", "Cancelled"). Click OK.
  5. Select only the visible rows. Press Ctrl + G (or F5) to open the Go To dialog. Click Special, choose Visible cells only, and click OK. This ensures you don't accidentally delete hidden rows.
  6. Delete the visible rows. Right-click any of the selected row numbers (on the left side) and choose Delete Row. The filtered rows are removed, and hidden rows stay.
  7. Clear the filter. Click the Filter button again (or press Ctrl + Shift + L) to see your remaining data.
  8. Alternative for blank rows: If you want to remove all blank rows, select your data, press Ctrl + G > Special > Blanks > OK. Then right-click a selected row number and choose Delete > Entire row.

Tips

  • Use a helper column for complex criteria: If you need to delete rows based on multiple conditions, add a temporary column with a formula like =OR(A2="Closed", B2="2023"), then filter on that column.
  • Don't use Ctrl+A if your data has blank columns: It may select the entire sheet. Instead, select the range manually or use Ctrl+Shift+End to go to the last used cell.
  • Always use "Visible cells only" before deleting: Forgetting this step can delete hidden rows you wanted to keep.
  • Undo is your friend: If you delete the wrong rows, press Ctrl+Z immediately. But if you've made many changes, the backup copy is safer.

Serving Suggestions

Use this technique to clean up survey responses, remove inactive customers from a mailing list, or strip out test records before analysis. It pairs well with sorting and deduplication—after removing unwanted rows, you can sort by date or category to get a tidy dataset.

Variations

  • Remove duplicate rows: Select your data, go to Data > Remove Duplicates, choose the columns to check, and click OK.
  • Delete rows based on cell color: If you've manually highlighted rows, use the filter dropdown > Filter by Color to select that color, then delete visible rows.
  • Use a formula to mark rows: Add a column with =IF(condition,"delete","keep"), filter for "delete", and remove those rows.
  • For very large datasets: Use Power Query (Get & Transform) to filter rows before loading the data into Excel—this is more efficient than manual deletion.

Storage and Reheating

Your cleaned data can be saved as a new file (Ctrl+S) immediately. If you need to undo later, keep the original backup sheet or file. For long-term storage, save as an Excel workbook (.xlsx) to preserve filters and formatting. If you close and reopen, filters will be cleared, but your deletions remain. There's no "reheating"—just reapply filters if needed.

Frequently Asked Questions

Why does my filter delete hidden rows too?
When you select filtered rows and press Delete, Excel only deletes visible cells, not entire rows. To delete entire rows, you must right-click the row numbers and choose "Delete Row"—that's why the "Visible cells only" step is crucial.

Can I delete rows that contain a specific word without using filters?
Yes. Use Find & Select (Ctrl+F) to find the word, then select all found cells (Ctrl+A in the Find dialog), close the dialog, and use the same right-click > Delete Row method. But filters are usually faster for multiple values.

What if my data has no header row?
Excel will still apply filters, but the first row will be treated as data. You can still filter and delete, but be careful—you might accidentally filter out your first row. Consider adding a header row first.

How do I delete every other row?
Use a helper column with a formula like =MOD(ROW(),2), filter for 1 or 0, then delete the visible rows. Or use the Go To Special > Blanks method after creating a pattern of blanks.

Is there a way to delete rows based on a list of values in another sheet?
Yes. Use a VLOOKUP or MATCH formula in a helper column to flag rows that match your list, then filter and delete. For example, =IF(ISNA(VLOOKUP(A2,ListSheet!A:A,1,FALSE)),"keep","delete").

Does this work in Google Sheets?
Yes, the same principles apply. Use Data > Create a filter, filter your column, select the visible rows, right-click and choose "Delete selected rows". The keyboard shortcuts differ slightly (Ctrl+Shift+L still works).

In this article
  1. Ingredients
  2. Instructions
  3. Tips
  4. Serving Suggestions
  5. Variations
  6. Storage and Reheating
  7. Frequently Asked Questions