This tutorial demonstrates how to delete blank columns in Excel and Google Sheets.
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.
To delete empty columns completely, follow these steps:
- Add one helper row above the dataset, and enter the formula in cell B1:
This formula counts all non-blank cells in the column.
- Now, copy the formula to the right, through to the last populated column (G).
All blank columns have zeros in the first row.
- Select all columns with a value of 0 in the first row (C and E), right-click the selected area, and choose Delete.
- Now, all blank columns are deleted, and you can delete the helper row.
Delete Blank Columns in Google Sheets
Following exactly the same steps, you can delete blank columns in Google Sheets.
The CountA formula can be slightly different in Google sheets as you do not need to add an end row to the formula.
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.