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.