Remove Blank Columns in Excel with Go To Special, COUNTA or Power Query
- Chris Menard
- 974 views
Blank columns can split Excel data and break sorting. Choose Go To Special, a COUNTA helper row or Power Query based on how the columns are labeled.

Blank columns can split an Excel dataset into separate blocks. That can cause a sort on Order ID to move only part of each row, leaving customer, product and total values beside the wrong order. The fix depends on whether the empty columns have headers and whether you receive the same untidy data repeatedly.

Three approaches cover those cases: Go To Special for columns with blank headers, a COUNTA helper row for columns that have headers but no data, and Power Query for a cleanup you can refresh when new data arrives. The examples below use columns C, F and J, but the same issue can affect blank rows.
Why empty columns disrupt Excel data
Excel can interpret a completely empty column as the edge of a data block. In the example, blank columns C, F and J divide what should be one order table into four sections. When the Order ID column is sorted from largest to smallest, Excel moves columns A and B but leaves the later blocks in place. The order details no longer match their IDs.


Filtering and PivotTables can also treat those separated blocks as distinct data. Removing the empty columns restores a continuous range that Excel can handle as one dataset.
Remove columns with blank headers using Go To Special
Go To Special is the quickest option when an empty column has no header and you know there is no data anywhere below it. In this example, cells C1, F1 and J1 are blank, and the columns beneath them are empty too.
Select the header row from A1 through L1, then press Ctrl + G to open the Go To dialog. Click Special, select Blanks and choose OK. Excel selects the blank cells in the selected header row.


With those cells selected, use Home > Delete > Delete Sheet Columns. Excel removes each selected column, including its cells below the header.

Check the result with a sort. Right-click a cell in A2, choose Sort, and sort Z to A. The whole row should now move together; Granite Partners, for example, moves to the bottom with its order details. Press Ctrl + Z if you want to undo the sort and restore the earlier order.

Find header-only columns with COUNTA
Go To Special on the header row won’t identify a column whose header contains text. In the second example, C1, F1 and J1 all say “Notes,” but the cells below each header are empty. Since those header cells aren’t blank, Excel doesn’t select them with the previous method.

Add a helper row above the headers. In A1, enter a COUNTA formula covering the data rows in that column:
=COUNTA(A2:A22)In this example, column A returns 21: one header plus 20 data entries. Copy the formula across the helper row. COUNTA counts cells that aren’t empty, so a column containing only its header returns 1. Columns with values below the header return a higher count.

Use the results to identify the header-only columns—in this case C, F and J—then delete those worksheet columns. Remove the helper row afterward. Set the formula range to cover all the data rows in your own file; the example range ends at row 22.
Make repeated cleanup easier with Power Query
When the same kind of messy data arrives regularly, Power Query lets you inspect and remove empty columns in a query, then refresh that query for later data. Start with the original data containing the blank columns. Click A1 and press Ctrl + Shift + End to select through the last used cell, including the blank columns between data.

Choose Data > From Table/Range. In the Create Table dialog, confirm My table has headers is checked. The example names the table tbl_orders; if your Excel version offers a name field in this dialog, you can enter a table name there. Click OK to open Power Query Editor.

Use Column quality to spot completely empty fields
Blank columns may appear in Power Query as Column1, Column2 and Column3. To review them without scanning across the preview, open the View tab and turn on Column quality in the Data Preview group.

The quality indicators show the share of values that are valid, errors or empty. In the example, Order ID and Order Date are 0% empty, while Column1 is 100% empty. Hover over its indicator to see the count: all 20 of 20 rows are blank.

Column2 and Column3 are also 100% empty. Region and Status are only 10% empty, so those columns contain data alongside some missing values. Keep them: a partially empty field isn’t the same as a completely blank column.

To remove the empty fields, hold Ctrl and select the Column1, Column2 and Column3 headers. Right-click and choose Remove Columns. When the query is ready, select Home > Close & Load. For the next batch of data, refresh the query to repeat the saved cleanup.
Choose the method that fits the data
Use Go To Special when the blank columns also have blank headers and contain no data. Use COUNTA when headers are present but the columns have no entries beneath them. For data that arrives in the same messy layout repeatedly, Power Query’s Column quality view makes fully empty columns easy to spot and lets you reuse the cleanup on refresh.
Before deleting anything, confirm that a column is truly empty. A column with some missing values may still carry useful information; the example’s Region and Status fields show why checking the empty percentage matters.