Remove Completely Blank Rows in Excel Without Losing Partial Records
A list can contain empty separator rows and legitimate records with missing fields. Selecting every blank cell does not distinguish those cases, so deleting the selected cells or their rows can damage the list.
Decide what counts as an empty record
For this example, one record occupies columns A:D. A row is removable only when all four cells are empty. The empty customer in O102 is missing information within an otherwise valid order. The zero amount in O103 is a recorded value, not a blank.
Choose the full record width before writing the formula. If your real data extends through column K, checking A:D is insufficient. A note, status, or identifier in E:K means that row contains data. Exclude unrelated side tables from the record definition, and keep the cleanup output on a separate worksheet.
Add a conservative row-wide helper
Enter the sample header and six data rows in A1:D7 of a fresh worksheet. The two comma-only CSV records correspond to empty cells across A4:D4 and A6:D6. If you paste from a text viewer, make sure the data actually occupies four columns before continuing.
- Save an untouched copy of the workbook. For a data-export workflow, work on a duplicate worksheet containing the same records.
- Enter keep_row in E1 and =COUNTA(A2:D2)>0 in E2. Fill E2 down through E7 only; do not extend across unused worksheet rows.
- Check the flags in source order: TRUE, TRUE, FALSE, TRUE, FALSE, TRUE. Investigate any difference before filtering.
- Select A1:E7, choose Data > Filter, and use the keep_row dropdown to display TRUE only. The four orders should remain visible.
=COUNTA(A2:D2)>0Make a compact copy of the kept records
The following copy procedure is for Windows desktop Excel. It avoids deleting worksheet rows that might also contain another table. For this plain export, the desired deliverable is a values-only snapshot; the original workbook remains the source of record.
- With keep_row filtered to TRUE, select A1:D7, including the header but excluding the helper column.
- Choose Home > Find & Select > Go To Special > Visible cells only, then OK. This explicitly excludes hidden or filtered rows from the selection.
- Copy the selection. On a new, unfiltered worksheet, choose A1 and use Paste Special > Values. Confirm that the records occupy A2:D5 without separator rows.
- Reapply number and date formats if needed, then verify the output against the expected file. Save the cleaned snapshot under a new name.
Treat formulas and invisible characters deliberately
COUNTA counts a formula that returns an empty string. It also counts spaces, errors, and zero. This deliberately favors keeping ambiguous rows so you can review them instead of discarding them.
A values-only copy does not preserve formulas: it records their current results. If the working workbook must retain calculations, keep it unchanged and use the helper filter as a view, or produce a separate reporting snapshot. Do not replace a calculation workbook with the snapshot.
| Source content across a row | Helper result | Meaning |
|---|---|---|
| All record cells genuinely empty | FALSE | Removable under this rule |
| ID present; customer missing | TRUE | Incomplete record to keep |
| A numeric zero | TRUE | Recorded value to keep |
| Formula returning an empty string | TRUE | Formula exists; review separately |
| A space or nonbreaking space | TRUE | Text exists; review before clearing |
| An error value such as #N/A | TRUE | Broken value; do not silently discard |
Verify records, positions, and totals
The cleaned output contains one header and four orders. Compare the exact order IDs and their sequence, then confirm the sum of amounts is 80. Check O102’s empty customer and O104’s empty note remain in their original columns. Preserving row alignment matters as much as removing visual gaps.
For this sample, enter =COUNTA(A2:A5) and =SUM(C2:C5) beside the clean output to obtain 4 and 80. The first formula works here because every valid order has an ID; do not reuse it as a general proof when IDs can be missing.
order_id,customer,amount,note
O101,Ada,25,paid
O102,,40,pending
O103,Bo,0,waived
O104,Cy,15,Avoid the shortcuts that mix records
Go To Special > Blanks selects individual empty cells, not only completely empty records. Deleting those cells with Shift cells up can move a customer name independently from its order ID. Deleting entire rows based only on blanks in customer would also remove O102.
Filtering one column for blanks is safe only if a documented business rule says that column must exist for every record you intend to retain. A cleanup guide cannot assume that rule. Use the full-width helper when the task is specifically to remove completely empty rows.
If rows appear blank because they are hidden, filtered, or formatted with invisible text, inspect those conditions before cleanup. The helper removes neither formatting nor hidden characters. Review uncertain cases in the source and rerun the same checks after any deliberate edits.
Related help: Inspect hidden spaces before treating text as empty
Common questions
Why did Go To Special > Blanks delete some real orders?
It selects blank cells within partially filled records. Deleting their entire rows removes the other fields too, while shifting individual cells can break alignment. Restore the original and classify each complete record with the helper.
Why does COUNTA keep a row that looks blank?
A formula returning empty text, a space, an error, or another stored value counts as content. Inspect the formula bar and all record columns before deciding that the row should be removed.
Does this method preserve formulas and formatting?
The source copy does. The compact output procedure intentionally pastes values for a data snapshot, so it does not retain formulas or all formatting. Keep the original calculation workbook and reapply the output formats you need.
Sources & method
- Microsoft: COUNTA function ↗
- Microsoft: Use COUNTA to count cells that are not blank ↗
- Microsoft: Copy visible cells only ↗
- Microsoft: Move or copy cells, rows, and columns ↗
Examples and diagrams use synthetic data. Application instructions follow the linked documentation; available menus and options can vary. Our sample checks do not establish behavior in every Excel or Google Sheets version. Read our AI-assisted editorial method.