How To Remove Blank Columns In Excel

6 min read

Blank columns in a spreadsheet are more than just a visual nuisance; they break formulas, skew pivot tables, inflate file sizes, and make printing a nightmare. Whether you are cleaning up a raw data export, preparing a dataset for analysis, or simply trying to make a report readable, knowing how to efficiently delete empty columns is a fundamental Excel skill. This guide covers every reliable method—from the fastest keyboard shortcuts to advanced Power Query automation—ensuring you can handle datasets of any size with confidence.

The Quickest Way: Go To Special (Best for Most Users)

If you need to remove blank columns right now without setting up macros or complex queries, the Go To Special dialog is the gold standard. It works on the principle of selecting only the empty cells within a highlighted range, allowing you to delete the entire column structure in one motion Worth keeping that in mind..

Step-by-step instructions:

  1. Select the entire dataset range where you suspect blank columns exist. Press Ctrl + A once (or twice if you are inside a Table) to select the current region.
  2. Open the Go To Special dialog. You can do this three ways:
    • Keyboard shortcut: Press F5, then click Special...
    • Keyboard shortcut: Press Ctrl + G, then click Special...
    • Ribbon: Home > Find & Select > Go To Special...
  3. In the dialog box, select Blanks and click OK. Excel will now highlight every empty cell within your selection.
  4. Critical Step: Do not click anywhere else. Right-click directly on one of the highlighted cells.
  5. Choose Delete... from the context menu.
  6. In the Delete dialog, select Entire column and click OK.

Why this works: Excel identifies columns where every cell in your selected range is blank. If a column has a header but no data, it will not be deleted using this method (which is usually the desired behavior). If you want to delete columns that are completely empty including the header row, ensure your selection in Step 1 includes the header row Took long enough..

The "Hidden Gem" Method: COUNTA Helper Row

The Go To Special method has a limitation: it deletes columns that are blank within the selected range. g.If you have a massive spreadsheet (e., 10,000 rows) but only data in the first 100, selecting the whole sheet (Ctrl + A twice) and using Go To Special will delete columns that have data in row 500 but look blank in your visible window Small thing, real impact. Less friction, more output..

The COUNTA Helper Row method gives you surgical precision. It creates a temporary "map" of your data density Small thing, real impact..

  1. Insert a new row at the very top of your data (Row 1).
  2. In cell A1, enter this formula: =COUNTA(A2:A1048576) (assuming data starts in Row 2). This counts non-empty cells in the entire column below.
  3. Drag the fill handle across to the last column of your dataset.
  4. Apply a Filter to this new header row (Data > Filter).
  5. Filter the helper row to show only 0 (zero).
  6. Select the visible columns (the filtered ones), right-click the column headers, and choose Delete Column.
  7. Clear the filter. Delete the helper row.

Pro Tip: This method is superior for "sparse" datasets where columns might have a single stray value 5,000 rows down that you want to keep, or conversely, columns that look empty but contain invisible spaces (which COUNTA counts as data, preventing accidental deletion) Simple, but easy to overlook..

Handling "Fake" Blanks: Spaces, Non-Breaking Spaces, and Errors

A frustratingly common scenario: You run the deletion tools, but columns stubbornly remain. They look empty, but Excel sees content. The usual culprits are:

  • Leading/Trailing Spaces: A cell containing " " (a space) is not blank.
  • Non-Breaking Spaces (Char 160): Common in web scrapes (CHAR(160)). Standard TRIM() does not remove these.
  • Formulas Returning "": A formula like =IF(A1>0, A1, "") returns a zero-length string. It looks blank, but COUNTA and Go To Special treat it as data.

The Cleanup Protocol (Run before deleting):

  1. Select your data range.
  2. Find & Replace (Ctrl + H):
    • Find what: Press Alt + 0160 on the numeric keypad (holds non-breaking space). Leave "Replace with" empty. Click Replace All.
    • Find what: (single space bar press). Leave "Replace with" empty. Click Replace All.
  3. Convert Formulas to Values (Optional but recommended): If columns contain formulas returning "", copy the range (Ctrl + C), then Paste > Values (V). This turns "" into truly empty cells.

After this sanitation, the Go To Special or Helper Row methods will work flawlessly.

The Modern Approach: Power Query (Get & Transform)

If you perform this cleanup weekly—or if your source data changes structure frequently—Power Query is the only professional solution. It records the steps as a repeatable script. When the source file updates, you click Refresh, and the blank columns vanish automatically.

  1. Select your data > Data > From Table/Range (ensure "My table has headers" is checked).
  2. In the Power Query Editor, go to the Home tab.
  3. Click Remove Rows dropdown > Remove Blank Rows (Wait—this removes rows. For columns, we need a different approach).
  4. The Column Trick: Select all columns (Ctrl + A inside the editor).
  5. Transform Tab > Transpose. Your columns become rows.
  6. Home > Remove Rows > Remove Blank Rows. (Now you are removing the original blank columns).
  7. Transform Tab > Transpose again to restore orientation.
  8. Home > Close & Load.

Why this wins: It is dynamic. If next month's export adds three new blank columns in the middle, Power Query removes them on refresh. No manual selection, no helper rows, no risk of human error Took long enough..

Automation for Power Users: VBA Macro

For legacy workbooks or environments where Power Query is disabled, a simple VBA macro clears the deck instantly. This script checks the UsedRange, which is faster than looping through all 16,000+ columns Not complicated — just consistent..

Sub DeleteBlankColumns()
    Dim ws As Worksheet
    Dim lastCol As Long
    Dim i As Long
    
    Set ws = ActiveSheet
    ' Find the last used column in the UsedRange
    lastCol = ws.UsedRange.Columns(ws.UsedRange.Columns.Count).Column
    
    Application.ScreenUpdating = False
    ' Loop backwards to avoid index shifting issues
    For i = lastCol To 1 Step -1
        ' Check if entire column is empty
        If Application.WorksheetFunction.CountA(ws.Columns(i)) = 0 Then
            ws.Columns(i).Delete
        End If
    Next i
    Application.ScreenUpdating = True
End Sub

How to install:

  1. Press Alt + F11 to open the VBA Editor.
  2. Insert > Module.
  3. Paste the code.
  4. Close the editor. Run via Alt + F8 > `Delete

How to install (continued): 4. Close the editor. Run via Alt + F8 > DeleteBlankColumns > Run. Or assign it to a button for one-click cleanup Easy to understand, harder to ignore..

Why this wins: It’s instantaneous on any sheet and requires no add-ins. The backward loop (Step -1) is critical—deleting columns from left to right shifts indexes and can skip columns or crash.

Conclusion: Choose Your Weapon

The right method depends on your data’s volatility and your comfort level:

  • For a one-time fix on a static report: Use the Helper Row method. It’s transparent and requires no setup.
  • For recurring, structured data that changes over time: Power Query is the undisputed champion. Its automation and repeatability are worth the initial learning curve.
  • For speed and control in a trusted environment: The VBA macro is your best friend. It puts the power directly in your hands.

Blank columns are more than an eyesore; they are silent data corruptors that break sorts, filters, and pivots. By implementing one of these solutions, you transform a chaotic spreadsheet into a reliable, professional tool. The time you invest in automating this cleanup will pay dividends in accuracy and efficiency for every report you ever build.

New In

Just Hit the Blog

More in This Space

Explore the Neighborhood

Thank you for reading about How To Remove Blank Columns In Excel. We hope the information has been useful. Feel free to contact us if you have any questions. See you next time — don't forget to bookmark!
⌂ Back to Home