Data Analysis

Delete Empty Cells in a Spreadsheet (2026 Guide)

Marc SeanJune 23, 20265 min read
=FILTER('Cost Centers'!A2:E500, 'Cost Centers'!A2:A500 <> "")

That formula strips blank rows and lands clean output wherever you need it - a summary tab, a board pack range, a pivot source. No manual selection, no accidental deletions.

For cases where you need the blanks physically gone from the source sheet, there are 3 more methods worth knowing. Each fits a different scenario.

Delete Empty Cells Non-Destructively: The FILTER Approach

FILTER is the right tool when your source data has blanks but you can't touch it. Common scenario: a system export lands in a raw tab with intermittent blank rows between department entries, and your P&L tab pulls from it.

The formula pattern for multi-condition blank removal:

=FILTER(
  'Raw Export'!A2:F2000,
  ('Raw Export'!A2:A2000 <> "") * ('Raw Export'!B2:B2000 <> "")
)

The * acts as AND - only rows where both column A and column B have values pass through. On a 2,000-row cost center export, the full setup (paste raw data, write the FILTER formula, wire the output to your P&L tab) takes under 60 seconds, and the clean output feeds directly into:

=SUMIFS(
  'Clean Export'!D:D,
  'Clean Export'!B:B, Assumptions!$B$3,
  'Clean Export'!C:C, ">=" & Assumptions!$C$2
)

According to Google's FILTER function documentation, the include argument must return an array of TRUE/FALSE values the same height as the source range. That's why the <> "" comparisons work here but a single-cell reference wouldn't.

One trap: cells containing ="" or a formula returning blank look empty but aren't. FILTER treats those as non-empty. More on that in the FAQ.

Delete Empty Cells Permanently in a Spreadsheet: Sort + Delete

When you need blanks physically removed - prepping a clean input range for a bank syndicate DCF, trimming a contribution margin table before sharing - Sort + Delete is the fastest manual method.

  1. Select the full data range including blank rows
  2. Data → Sort range → sort by any non-critical column ascending
  3. Blanks sort to the bottom
  4. Select the blank rows, right-click → Delete rows
  5. Re-sort by your original key column

On a 5,000-row sheet this takes under 90 seconds. The downside: it scrambles row order temporarily, so don't use it if sequence matters for anything downstream.

Go To Special → Blanks: Deleting Empty Cells in Excel

In Excel, Go To Special handles this cleanly without sorting:

  1. Select the column (or range) containing blank cells
  2. Ctrl+G (or F5) → Special → Blanks → OK
  3. Right-click any selected cell → Delete → Shift cells up (or Entire row)

Microsoft's support article on selecting specific cells or ranges documents this as part of the Go To Special feature set. As of June 2026, it works identically in Excel 365, Excel 2021, and the web version.

One thing to watch: if you select "Entire row" and delete, you lose any data in other columns on those rows. Use "Shift cells up" only if the blanks are isolated to a single column you're cleaning.

Apps Script: Automate Empty Cell Deletion at Scale

For a 50,000-row SKU file or any dataset where manual methods take too long, Apps Script handles it in under 3 seconds:

function deleteEmptyRows() {
  const sheet = SpreadsheetApp.getActiveSpreadsheet()
    .getSheetByName('Raw Data');
  const data = sheet.getDataRange().getValues();
  
  // Keep only rows where column A has a value
  const kept = data.filter(row => row[0] !== '' && row[0] !== null);
  
  // Write back
  sheet.clearContents();
  sheet.getRange(1, 1, kept.length, kept[0].length).setValues(kept);
}

To run this automatically when the file opens, attach it as an onOpen trigger. According to Google's Apps Script Triggers documentation, simple triggers like onOpen run without additional authorization, while installable triggers let you schedule the cleanup on a time-based interval - useful if your ERP exports land on a regular cadence and you want the raw tab pre-cleaned before anyone touches it.

The tricky variant of this problem - identifying cells where a formula returns "" and treating them as true blanks - is where ModelMonkey earns its keep. Because it reads both the formula logic and the underlying data, it can distinguish a $4.2M quarterly revenue row that's genuinely empty from one that's blank because a product flag toggled the gross margin from 38.5% to nothing. That distinction matters when you're deciding whether to delete the row or just fix the upstream assumption.

Which Method to Use When Deleting Empty Cells in a Spreadsheet

ScenarioBest method
Source data is untouchable (system export, shared tab)FILTER
Quick manual cleanup before sharing a modelSort + Delete
Excel, blanks scattered across a columnGo To Special
50,000+ rows, recurring scheduled cleanupApps Script
Blanks vs. formula-empty cells (hard to distinguish)Apps Script or ModelMonkey

In summary: use FILTER when you want clean output without modifying source data, Sort + Delete for fast one-off cleanup, Go To Special in Excel, and Apps Script when scale or automation is the constraint.


Frequently Asked Questions