How to Delete Empty Columns in Excel Safely
How to delete empty columns in Excel safely: a formula to preview them first, why Go To Special deletes too much, and a free macro for the whole scan.
2026-04-28
The "47 columns, only 8 have data" problem
CSV exports and Power Query refreshes often leave columns entirely blank, a "Notes 2" field nobody fills, a join column that ended up empty after a filter step. Deleting them sounds like a two-click job, but Excel makes it surprisingly easy to delete the wrong thing instead.
TL;DR: Key takeaways
- A COUNTA formula lets you see which columns are empty before deleting anything, no VBA needed.
- Go To Special > Blanks is a trap here. It selects individual blank cells; deleting those columns removes any column containing even one blank, not just fully empty ones.
- A free macro scans your selection and deletes any column that's entirely blank, right-to-left for index stability.
Method 1: A COUNTA formula, to see before you delete
- Insert a blank row above your data.
- Enter
=COUNTA(A2:A10000)=0, adjusted to your data's height, in the first column. - Fill the formula across every column.
TRUEmeans empty.
COUNTA counts any cell with content, including a formula returning an empty string "". A column full of formulas that all evaluate to blank reads as non-empty to COUNTA, so it survives this check even though it looks empty on screen. Ctrl-click headers that read TRUE and delete.
Why Go To Special deletes too much
Nearly every generic tutorial recommends Ctrl+G > Special > Blanks for empty-cell problems, and that's the wrong advice here. It selects individual blank cells, not blank columns. Choose Delete > Entire Column afterward and Excel removes every column containing even one of those blanks.
Say column D has 500 rows of data and one blank cell at row 200. Go To Special still selects that blank, and Delete Entire Column takes the whole column, all 499 real values included. Use the formula above or the macro below instead; both check a column's full range, not whether it merely contains a blank.
Method 2: The free macro
Download Delete Empty Columns. Free .xlsm.
- Select the range to scan. Alt + F8, pick the macro, click Run.
- Empty columns are deleted right-to-left so indices stay stable. Reports the count.
Unlike Go To Special, this checks each column as a whole: a column with 499 values and one blank stays untouched. It also treats a cell as empty if it's truly blank, an empty string, or whitespace-only, which catches "stealth empty" columns from copy-paste spaces that survive the COUNTA check but not this.
Why columns won't delete (or come back)
Three real causes: the column isn't actually empty (stray whitespace or a formula returning "", only the macro catches those, not COUNTA); your selection didn't cover the full data height, so real content sitting below your selected range gets missed entirely; or the sheet's used range is bloated from old formatting, check with Ctrl+End and if it lands far past your real data, that's a separate cleanup (select from your real last column to the sheet's edge and delete, per Microsoft's Last Cell definition).
A real example
A marketing analyst pulls a daily campaign export with 47 columns, 22 of them always empty because the account doesn't use those features. Selecting the full data block and running the macro clears all 22 in about a second, versus roughly 4 minutes of Ctrl-clicking headers by hand.
Frequently asked questions
Why did Go To Special delete columns that weren't empty?
Because it selects individual blank cells, not blank columns. Delete > Entire Column then removes every column touched by one of those cells, including columns mostly full of real data. Use the COUNTA formula or the macro instead.
Will it delete columns with formulas evaluating to blank?
Yes. A formula returning "" is treated as blank by the macro. Copy such columns to values first if you want to keep them.
Does it work on filtered data?
The macro checks every cell in the selection regardless of filter. To check only visible cells, copy the visible rows to a fresh sheet first.
Can I undo it?
Yes, Ctrl/Cmd + Z right after running.
What to do next
Preview with the COUNTA formula or Highlight Blank Cells first, skip Go To Special for this specific job, then run the macro once you're confident what's actually blank. For the row-direction sibling, use Remove Blank Rows.