How to Delete Blank Columns in Excel & Google Sheets

Written by

Editorial Team

Reviewed by

Laura Tsitlidze

Last updated on December 11, 2022

This tutorial demonstrates how to delete blank columns in Excel and Google Sheets.

 

delete blank columns initial data

 

Delete Blank Columns

If you have a dataset containing blank columns, you can easily delete them using the COUNTA Function. Say you have the following dataset.

 

delete blank columns initial data

 

To delete empty columns completely, follow these steps:

  1. Add one helper row above the dataset, and enter the formula in cell B1:
=COUNTA(B2:B1048576)

 

delete blank columns 1

 

This formula counts all non-blank cells in the column.

  1. Now, copy the formula to the right, through to the last populated column (G).

 

delete blank columns 2

 

All blank columns have zeros in the first row.

  1. Select all columns with a value of 0 in the first row (C and E), right-click the selected area, and choose Delete.

 

delete blank columns 3

 

  1. Now, all blank columns are deleted, and you can delete the helper row.

 

delete blank columns 4

 

See also: How to Delete Blank Rows

Delete Blank Columns in Google Sheets

Following exactly the same steps, you can delete blank columns in Google Sheets.

 

deletecolumns gs

 

The COUNTA formula is slightly different in Google Sheets; you do not need to add an end row to the formula.

=COUNTA(B2:B)

You can then select the columns that contain a zero and right-click on one of the selected column headers and select Delete selected columns.

 

delete columns gs 2

AI Formula Generator

Try for Free

See all How-To Articles