Get the local build — $9
cleaningrows

Removing blank rows without losing data

Deleting blank rows sounds like the safest operation in Excel and it is the one most likely to destroy something, because "blank" has four different meanings and only one of them is safe to delete automatically.

Four kinds of blank

Truly empty: no cell in the row has any value. Safe to drop, always.

Whitespace-only: cells contain a space or a full-width space. Invisible, not empty — Excel's Go To Special will not find these, and a row count will be wrong by however many the export appended.

Formula blanks: a cell containing ="" looks empty, and ISBLANK says false. If you filter on blanks you will not see them; if you delete the row you delete a live formula.

Used-range padding: rows below your data that contain only formatting. Excel reports the sheet as 1,048,576 rows; the last real row is 4,318. This is why copying a whole column gives you a million rows of nothing.

Delete rows, not cells

Selecting a range and pressing Delete clears contents but leaves the rows in place — your data still has gaps, and any formula that counts rows still counts them. Deleting entire sheet rows shifts everything up, which is what you actually want, and it is much slower on large sheets.

On 500,000 rows, deleting rows one at a time in Excel takes minutes and often freezes. Filtering and deleting visible rows is faster but easy to get wrong: it deletes only the rows the filter shows, which is correct only if the filter is exactly your blank condition.

Decide about the rows that are only partly empty

A row where the amount is present but the customer name is missing is not blank, and deleting it loses money. A row where only a key column is empty but other cells have values is a data problem worth looking at, not a formatting artifact.

The safe default: drop rows with no non-empty cell, and report rows that are missing a value in the key column. You look at the report; the tool does not decide.

Step by step

  1. Merge everything into one sheet first — cleaning twelve files separately is twelve times the work.
  2. Run the blank-row pass with whitespace-only cells treated as empty.
  3. Read the report: how many rows were dropped, and how many were flagged for a missing key.
  4. Spot-check three dropped rows against the source to confirm they were genuinely empty.
  5. Only then build the summary — a row count computed before cleaning is not the row count.

The command, concretely

python sheetkit.py clean merged.xlsx --drop-blank-rows -o clean.xlsx

# dropped   1,842 rows with no non-empty cell
# kept         37 rows where only the key column was empty   <- flagged, not dropped
# rows before 4,318  ->  after 2,476

What goes wrong

Filter, select visible, press Delete

That clears cell contents and leaves the rows. Use Delete Sheet Rows on the visible selection, or let a script rebuild the sheet without those rows.

Sorting with blanks in the middle

Sorting pushes blank rows to the bottom, which hides the fact that they were interspersed — and any block structure in the file is lost. Remove them first, then sort.

Deleting rows that separate sections

Some exports use a blank row between sections on purpose. Dropping it merges the sections into one continuous table, which may be fine — but decide, do not discover.

Questions people actually ask

Why does Excel say my sheet has a million rows?

The used range extends past the last real row because of formatting. Count rows that have at least one non-empty cell instead of trusting Ctrl+End.

Can I remove blank rows without a script?

Yes: select the data, Go To Special > Blanks, then Delete Sheet Rows. It handles truly empty cells only — whitespace-only and formula blanks survive.

Will removing blank rows break formulas?

Relative references inside the table shift with the rows, which is usually what you want. Absolute references to a deleted row become #REF!, so clean before you build formulas on top.

Do it now, in this browser

Drop the folder in, check the detected header, merge. Nothing is uploaded — the file is processed in the tab. Free for one-off merges; the unlimited local build is $9.