Delete columns that are no longer needed, contain superfluous data, or were created accidentally.
Sometimes you may have a column or columns of data that are no longer needed in your worksheet. Like other spreadsheet software, it is easy to delete columns or the data in columns, and easy to undo any accidental deletions.
How to Delete a Column
There are multiple ways to delete a column. You can delete a column by right clicking on the column header or clicking the downward arrow to the right of the column name and selecting “Delete column __” from the dropdown.
Alternatively, you can select a cell in the column you want to delete, right click, and select "Delete column __" from the dropdown.
You can also access delete options from the document menu by navigating to Edit > Delete column.
How to Access the Document Menu
To access the document menu,
- Open the document dropdown by clicking the arrow to the right of the document name
- Select "Menu..." from the dropdown
Want to delete multiple columns at once? Select all of the contiguous columns you want to delete and follow any of the three processes described above. Note that if your multi-column selection includes your primary column, the “Delete columns” option will not be available since your primary column cannot be deleted.
It’s important to remember that deleting columns removes the data from your spreadsheet entirely. If you don’t want to see columns temporarily but may need to reference them later, use the "Hide columns" option in the View menu or column dropdown instead.
Deleting Data but Retaining the Column
You can also delete the data in a column, but retain the empty column. This allows you to retain the formatting and data types of the column, but replace the data in it. To delete data, but not the column in this way, simply select the desired column and press the Delete or Backspace key. Or, open the workbook menu and navigate to Edit > Delete value.
Undo
It's easy to fix any mistakes with undo. For instance, if you accidentally delete a column, or the data in a column, and wish to restore it. To undo an action, either use the keyboard shortcut Ctrl + Z, select the Undo button in the Toolbar, or choose the Undo option in the Edit menu.
Deleting Primary Columns
Primary columns cannot be deleted. However, you can change which column is primary and then delete the previously primary column. This is because primary columns are instrumental, with data in the primary column used to uniquely identify the rows in that worksheet.
Formulas
Deleting columns may affect formulas in your worksheet, which may return a #REF error or require you to change the cell reference. For more details, check out the Formula readjustment article.
If you don't want to delete a column, but you do want to remove it from view, you can use the hide feature to hide columns from view.