Skip to the stories
Excel & Power BI

Three Ways to Remove Blank Columns in Excel and Keep Data Together

Blank columns can split Excel data and break sorts, filters and PivotTables. Choose Go To Special, COUNTA or Power Query based on the column contents.

Three Ways to Remove Blank Columns in Excel and Keep Data Together

Blank columns can make one Excel data set behave like several unrelated blocks. That’s more than a formatting nuisance: sorting by Order ID may move only the columns before the first gap, leaving customers, products and totals attached to the wrong orders. The right cleanup method depends on whether those empty columns have headers and whether the same messy data arrives repeatedly.

Delete Blank Columns in Excel: 3 Easy Ways

There are three practical options: use Go To Special when the blank columns have no headers, count populated cells with a COUNTA helper row when they do, or remove fully empty columns in Power Query and refresh the query when new data arrives.

Why empty columns disrupt a worksheet

In the sample order data, columns C, F and J are empty. Excel treats the gaps as boundaries, splitting the records into separate blocks. A sort of the Order IDs from largest to smallest moves columns A and B, but leaves the later blocks in place. The resulting row no longer reliably connects an order ID to its customer, product and total.

Delete Blank Columns in Excel: 3 Easy Ways
Columns C, F, and J are empty. To Excel, this is no longer one data set.
Delete Blank Columns in Excel: 3 Easy Ways
After sorting Z to A, Order ID starts at ORD-1020, but the rest of the row data did not move with it.

Filtering and PivotTables can run into the same structural problem: Excel may recognize each block as a separate range. The goal is to remove only columns that are truly empty, joining the fields into one continuous data set before sorting or analysis.

Use Go To Special when the headers are blank

This is the quickest method when each empty column also has an empty cell in the header row, and there is no data underneath. In the example, cells C1, F1 and J1 are blank, so selecting the header row is enough to identify the columns.

  1. Select the header row across the data, from A1 through L1.
  2. Press Ctrl + G to open the Go To dialog box, then select Special.
  3. Choose Blanks and click OK. Excel selects the empty header cells.
  4. On the Home tab, open the Delete menu in the Cells group and choose Delete Sheet Columns.
Delete Blank Columns in Excel: 3 Easy Ways
Select the header row, then press Ctrl + G to open Go To.
Delete Blank Columns in Excel: 3 Easy Ways
In Go To Special, choose Blanks. Excel selects only the empty cells inside the header row.
Delete Blank Columns in Excel: 3 Easy Ways
Home > Delete > Delete Sheet Columns removes all three blank columns at once.

After deleting the gaps, test the structure with a sort. In the example, sorting the Order IDs from Z to A now moves each complete row together; Granite Partners, previously at the top, ends up at the bottom with its order details still aligned. Press Ctrl + Z to undo the sort if you want to restore the previous order.

Delete Blank Columns in Excel: 3 Easy Ways
Delete Blank Columns in Excel: 3 Easy Ways
With the blank columns removed, a Z to A sort keeps every row intact.

Use COUNTA when empty columns have headers

Go To Special on the header row won’t catch a column whose header contains text. In the second example, C1, F1 and J1 each contain “Notes,” but the cells below those headings are empty. Use a helper row to count the nonempty cells in each column, then identify columns that contain only a header.

Insert a row above the headers. In A1, enter a COUNTA formula covering the cells below the header through the last data row:

=COUNTA(A2:A22)

In this example, the formula returns 21 for column A: one header and 20 data rows. Copy the formula across the helper row to check the other columns. COUNTA counts cells that aren’t empty, including text, numbers and dates. A column with a header and nothing below it returns 1.

Delete Blank Columns in Excel: 3 Easy Ways
Each Notes column has a header but no data. Go To Special on the header row will skip these.
Delete Blank Columns in Excel: 3 Easy Ways
COUNTA in the helper row. The columns that return 1 have a header and nothing else.

In the sample, C, F and J return 1. Select and delete those columns, then remove the helper row. Check that the formula range matches the actual data in your worksheet; the example range ends at row 22, and other files may have a different number of rows.

Use Power Query for recurring cleanup

If the same kind of data arrives regularly, Power Query can turn the cleanup into a repeatable query. Start with the original data, including the empty columns. Click A1, then press Ctrl + Shift + End to select the range through the last used cell, including the gaps.

Delete Blank Columns in Excel: 3 Easy Ways
Click A1 and press Ctrl + Shift + End to select everything, blank columns included.

On the Data tab, select From Table/Range. In the Create Table dialog, confirm that My table has headers is checked. The example table is named tbl_orders; naming it there makes it easier to recognize later. Click OK to open the Power Query Editor.

Delete Blank Columns in Excel: 3 Easy Ways
Name the table in the Create Table dialog box, confirm it has headers, and click OK.

Find fully empty columns with Column quality

In Power Query Editor, open the View tab and turn on Column quality in the Data Preview group. The preview adds Valid, Error and Empty percentages under each column header. This makes it easier to scan a wide table than checking columns one at a time.

Delete Blank Columns in Excel: 3 Easy Ways
View > Column quality adds Valid, Error, and Empty percentages under every column header.

In the example, Order ID and Order Date are 0% empty, while Column1 is 100% empty. Hover over its quality bar to see the count: 20 of 20 rows are blank. Column2 and Column3 are also completely empty.

Delete Blank Columns in Excel: 3 Easy Ways
Column1 is 100% empty. The hover card confirms all 20 rows are blank.

Use the percentage to distinguish empty columns from fields that contain some missing values. Region and Status are each 10% empty in the example, but still contain data; they should remain. To remove the fully blank columns, hold Ctrl while selecting the Column1, Column2 and Column3 headers, right-click and choose Remove Columns. Then select Close & Load on the Home tab.

Delete Blank Columns in Excel: 3 Easy Ways
Scan the Empty row for 100%. Column2 and Column3 are completely blank; Region and Status are not.

When the next data set arrives, refresh the query to apply the saved cleanup. That saves repeated manual deletion, while Column quality gives you a quick way to review which columns are entirely blank in the preview.

Choose the method that fits the data

  • Blank headers: select the header row and use Go To Special to find blank cells, then delete their sheet columns.
  • Headers with no data beneath them: use a COUNTA helper row. A result of 1 identifies a column containing only its header.
  • Recurring data imports: use Power Query, inspect the Empty percentages and remove columns that are 100% empty. Refresh the query for later data.

The key check is whether a column is completely empty below its header. A partly empty field such as Region or Status may still carry useful records. Once the truly empty columns are removed, verify the range with a sort: every field should move with its record.

Source: Chris Menard · chrismenardtraining.com

Same flag