Remove Blank Columns in Excel with Go To Special, COUNTA or Power Query
By Chris Menard 829 views
Blank columns can split Excel data and disrupt sorts. Choose Go To Special, a COUNTA helper row or a reusable Power Query cleanup.

Blank columns can quietly break a worksheet’s structure. Excel may treat the data on either side as separate blocks, so a sort can move order IDs without moving the customer, product and total values that belong with them. The right cleanup method depends on whether the empty columns have headers and whether the same messy data arrives regularly.
Three approaches cover those cases: use Go To Special when the blank columns have no headers, a COUNTA helper row when they do, or Power Query when you want to save the cleanup for future refreshes. The examples below use columns C, F and J, but the same choices apply to blank rows.

Why empty columns matter
In the sample order data, columns C, F and J are completely empty. They divide what should be a single dataset into four blocks. That gap can affect sorting, filtering and PivotTables because Excel may treat each block as a separate range.

The sort example shows the risk clearly. Sorting Order IDs in column A from Z to A moves columns A and B, but the other blocks stay where they are. The order IDs no longer line up with their customers, products and totals. Remove the blank columns before relying on the worksheet as one continuous data range.

Use Go To Special when headers are blank
Go To Special is the quickest option when an empty column also has an empty header cell, and you know there is no data farther down that column. In this example, C1, F1 and J1 are blank, with nothing below them.
Select the header row from A1 through L1, then press Ctrl + G to open the Go To dialog. Choose Special, select Blanks and click OK. Excel selects the empty cells in the selected header row—in this case, C1, F1 and J1.


With those cells selected, open the Home tab, click the Delete dropdown in the Cells group and choose Delete Sheet Columns. Excel removes the full columns, joining the remaining data into one range.

Check the result with a sort. Click a data cell, such as A2, right-click, choose Sort and sort Z to A. Every column should now move together. In the example, Granite Partners moves to the bottom with its matching order data. Press Ctrl + Z to undo the sort if you want to restore the previous order.

Use COUNTA when empty columns have headers
Go To Special on the header row won’t identify a column whose header is filled in. In the second example, C1, F1 and J1 all contain the header Notes, but there is no data below any of them. A helper row with COUNTA makes those columns easier to identify.

Insert a row above the headers. In A1, enter a COUNTA formula that covers the cells below the helper row down to the last data row:
=COUNTA(A2:A22)Here, the formula returns 21 for column A: one header and 20 data rows. Copy the formula across the helper row to check each column. COUNTA counts cells that aren’t empty, so a column with a header and nothing below it returns 1. In this example, columns C, F and J return 1.

Delete the columns that return 1, then remove the helper row. Check that those columns contain no values below their headers before deleting them; the formula only reports the number of nonempty cells in the range you give it.
Use Power Query for data you receive repeatedly
If the same kind of messy dataset arrives regularly, Power Query can make the cleanup reusable. Start with the original data, including the empty columns. Click A1 and press Ctrl + Shift + End to select the used range through its last cell, including the gaps.

On the Data tab, click From Table/Range. In the Create Table dialog, confirm that My table has headers is checked, then click OK. The example table is named tbl_orders; Excel can let you set a table name in this dialog. The Power Query Editor opens with the data ready to inspect.

Completely blank columns may appear as Column1, Column2 and Column3. Rather than searching across the preview by eye, use the editor’s column quality view. On the View tab, select Column quality in the Data Preview group.

The view adds Valid, Error and Empty percentages under each header. A column showing 100% empty is a candidate for removal. Hover over its bar to see the count: in the example, Column1 has 20 empty values out of 20 rows. Column2 and Column3 are also completely empty.

Don’t remove every column that has missing values. Region and Status are each 10% empty in the example, but they contain real data. To remove only the completely empty columns, hold Ctrl, select the Column1, Column2 and Column3 headers, right-click and choose Remove Columns. Then choose Close & Load on the Home tab.

When the same data arrives again, refresh the query to apply the saved cleanup. That can save repeated manual work, while still leaving you responsible for checking which columns are genuinely empty.
Choose the method that fits the data
Use Go To Special when the blank columns have no headers and you can rely on the header row to identify them. Use COUNTA when those columns have headers but no values beneath them. For recurring imports, Power Query’s Column quality view helps you find columns that are 100% empty and retain the cleanup for future refreshes.
After removing columns, test the range with a sort to confirm that each row stays together. The same methods can help with blank rows, but the key decision remains the same: identify what is truly empty before deleting it.