keepcalculator

06 Numbers and Powers

Remove Blank Rows: Quick Ways in Excel & Google Sheets

Card No. 06·63666 · Updated · Standard formula, shown below

This guide answers the question directly: yes, you should remove blank rows from your spreadsheet data, and here are the fastest, safest ways to do it. You’ll learn manual methods, filter-based deletion, and a formula approach that works in both Excel and Google Sheets, so you can clean your data without accidentally deleting information you need.

Why Blank Rows Are a Problem

Blank rows in a dataset are more than an eyesore—they actively break things. Sorting, filtering, pivot tables, and charts all treat a blank row as the end of the data range. If you try to sort a column with a blank row in the middle, Excel will only sort the rows above it, leaving the rest unsorted. Similarly, a pivot table will ignore any data below a blank row, and a chart will show a gap or stop entirely.

Blank rows also cause problems with formulas. Functions like COUNTA or SUM that reference a whole column will still work, but if you use structured references (like Table1[Column]), a blank row can create a “#VALUE!” error in some cases. And when you import data from another system, blank rows often appear at the end of the file, making the range much larger than it needs to be.

Method 1: Delete Single Blank Rows (Manual)

If you only have a few blank rows, the simplest approach is to select them and delete. Here’s how:

  1. Click the row number on the left side of the spreadsheet to select the entire row.
  2. Hold Ctrl (Windows) or Cmd (Mac) and click other blank row numbers to select multiple rows at once.
  3. Right-click any selected row number and choose Delete.

This works in both Excel and Google Sheets. The rows below will shift up, and your data remains intact. Be careful not to select rows that contain data you want to keep—double-check that each selected row is truly empty.

Method 2: Filter and Delete (Best for Large Datasets)

When you have hundreds or thousands of rows, manual deletion is impractical. The filter method is the fastest way to remove all blank rows at once.

In Excel:

  1. Select your entire data range (including headers).
  2. Go to the Data tab and click Filter (or press Ctrl+Shift+L).
  3. Click the drop-down arrow on any column that you know has no blank cells (like an ID column).
  4. Uncheck Select All, then check only (Blanks).
  5. Now only blank rows are visible. Select all visible rows (click the row numbers), right-click, and choose Delete Row.
  6. Clear the filter by clicking Clear on the Data tab.

In Google Sheets: The process is nearly identical. Select your data, click the filter icon in the toolbar, then use the filter drop-down on a column to select only “(Blanks)”. Delete those rows, then turn off the filter.

Important: If you have a column that is completely blank (no data at all), the filter will show all rows as blank. In that case, use a column that has data in every row you want to keep.

Method 3: Use Go To Special (Excel Only)

Excel has a built-in tool called Go To Special that selects all blank cells in a range. Here’s how to use it to delete blank rows:

  1. Select your entire data range (including headers).
  2. Press F5 or Ctrl+G to open the Go To dialog.
  3. Click Special.
  4. Choose Blanks and click OK.
  5. All blank cells in the range are now selected. If a row is completely blank, all its cells will be selected.
  6. Right-click any selected cell and choose Delete….
  7. In the dialog, select Entire row and click OK.

This method deletes any row that has at least one blank cell in the selected range. If you have columns with legitimate empty cells (like an optional notes column), this will delete those rows too—so use it only when your data has no intentional blanks.

Method 4: Sort to Push Blank Rows to the Bottom

A quick workaround is to sort your data by a key column. Blank rows will be pushed to the bottom (or top, depending on sort order). Then you can simply select and delete those trailing rows.

Steps:

  1. Select your data range.
  2. Go to Data > Sort.
  3. Choose a column that has data in every row you want to keep.
  4. Sort ascending or descending—blank cells will be placed at the bottom in either case.
  5. After sorting, the blank rows will be at the end. Select them and delete.

This method is simple, but it changes the order of your data. If the original order matters, you’ll need to add a column with row numbers first, then sort, delete blanks, and sort back by that column.

Formula-Based Cleaning (For Advanced Users)

If you need a dynamic solution—one that updates automatically when new data is added—you can use a formula to create a cleaned version of your data. In Excel 365 or Google Sheets, you can use FILTER to exclude blank rows.

Example (Google Sheets):

=FILTER(A2:C100, BYROW(A2:C100, LAMBDA(row, COUNTA(row)>0)))

This formula returns only the rows where at least one cell has content. In Excel, you can use a similar approach with FILTER and BYROW (available in Excel 365). If you’re on an older Excel version, you can use an array formula with IF and SMALL, but it’s more complex.

This method is ideal if you’re building a dashboard or a report that should always exclude blank rows without manual intervention.

Common Mistakes and Pitfalls

  • Deleting rows with hidden data: A row may look blank but contain spaces, apostrophes, or invisible characters. Use =ISBLANK(A1) to check if a cell is truly empty.
  • Using “Delete” instead of “Delete Row”: If you select cells and press Delete, you only clear the contents, leaving the blank row in place. Always delete the entire row.
  • Deleting rows with partial blanks: The Go To Special method deletes rows with any blank cell, not just completely blank rows. Use it only when your data has no intentional empty cells.
  • Filtering on a column that has blanks: If you filter on a column that itself has blank cells, you’ll hide rows that contain data in other columns. Choose a column that is complete.

Frequently Asked Questions

How do I remove blank rows in Excel without affecting other data?

Use the filter method: apply a filter, select only “(Blanks)” in a column that has no blanks in your real data, then delete those rows. This only removes rows that are completely blank in that column, leaving all other rows untouched.

Why does my blank row keep coming back after I delete it?

This usually happens if the blank row is part of an Excel Table (created with Ctrl+T). Tables automatically expand when you type in a row below them. To stop this, convert the table back to a range (Table Design > Convert to Range) or ensure you delete the row within the table boundaries.

Can I remove blank rows in Google Sheets with a script?

Yes, you can use Google Apps Script to delete rows that are completely empty. A simple script loops through the data and removes rows where all cells are blank. This is useful for recurring tasks, but the built-in filter method is sufficient for one-time cleaning.

What is the difference between blank rows and hidden rows?

A blank row has no content at all, while a hidden row is simply not visible—it still contains data. Hidden rows can be revealed by selecting rows around them and right-clicking > Unhide. Blank rows are actual empty rows that you can delete.

Will removing blank rows mess up my formulas?

If your formulas reference specific cells (like =A1+B1), deleting rows will change those references and could cause errors. If your formulas use full-column references (like =SUM(A:A)), they will automatically adjust to the new range. Always check formulas after deleting rows.

Is there a keyboard shortcut to delete blank rows?

There’s no single shortcut to delete all blank rows, but you can use Ctrl+G > Special > Blanks to select them, then press Ctrl+- (minus) to delete the rows. That’s the fastest keyboard-only method in Excel.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →