Google Sheets is one of the most popular spreadsheets for managing and analyzing data, as well as collaborating with team members. Whether youโre working on a small or large dataset, it is essential to keep your Google Sheets organized and clean. One way to achieve this is by clearing the content of cells that are no longer needed.
To remove all the data, formulas, or formatting from a sheet, this article will provide you with a step-by-step guide on how to clear content in Google Sheets. We’ll also cover how to clear multiple cells, how to clear cell contents in Google Sheets (without deleting formulas), and getting the sleekest spreadsheet possible.
Table of Contents
How To Clear Content in Google Sheets: A Step-by-Step Guide
Clearing cells in Google Sheets is a straightforward process that can be done manually or with a script. Here, we will explore the different ways to clear content in Google Sheets, including multiple cells (without deleting formulas).
Related: To enable screen reader support in Google Docs, press Ctrl+Alt+Zย on Windows (or Command+Option+Zย on Mac).
How To Clear Cells in Google Sheets
To clear the contents of a single cell in Google Sheets, follow these steps:
- Click on the cell with the content that you want to clear.
- Click the โBackspaceโ or โDeleteโย key.
How To Clear Multiple Cells in Google Sheets
If you need to clear multiple cells in Google Sheets:
- Select the cell range with the content that you want to clear.
- Click either the โBackspaceโย or โDeleteโ button on your keyboard. Alternatively, you can click on Edit > Delete > Values.
Related: How to Delete Empty Rows in Google Sheets
How To Clear Contents in Google Sheets Without Deleting Formulas
When you clear the cell contents from a single cell or a range of cells, formulas included in those cells are also deleted. However, there is a way to clear the formattingย without deleting the formulas:
- Select the cells with the formatting that you want to clear.
- Go to the “Format”ย menu and choose “Clear formatting.”ย Otherwise, press CTRL + on Windows or CMD + ย on macOS. Google Sheets will remove the formatting while leaving the formulas intact.
How To Use a Google Sheets Clear Content Script
You can use a custom script to clear formatting and content from a single cell (or multiple cells), as well as customize the script to ignore formulas. The following script will delete formatting and content but leave the original formulas intact:
``` function clearContentAndFormatting() { var sheet = SpreadsheetApp.getActiveSheet(); var range = sheet.getActiveRange(); range.setValues(range.getFormulas()); range.clearFormat(); } function onOpen() { var ui = SpreadsheetApp.getUi(); ui.createMenu('Delete') .addItem('Clear Content and Formatting', 'clearContentAndFormatting') .addToUi(); } ```
To use this Google Sheets clear cells script:
- Go to the “Extensions” menu and choose “Apps Script.”
- Copy and paste the script above into the code.gs file.
- Name and save the script, close the script editor, and return to your sheet. You will now see a โDeleteโย menu next to โHelp.โ
- Select the cells with the content and formatting that you want to clear.
- Select โDeleteโ > โClear content and Formatting.โ
- As you can see below, the script clears the selected cellsโ content and formatting while leaving the SUM formula intact.
Related: How to Delete Multiple Google Sheets at Once
Conclusion
Knowing how to clear content in Google Sheets is a simple process that can be done with a few clicks. To learn countless options from a seasoned professional, check out our Google Forms and Sheets Masterclass.
Another great method for saving time and effort? Rather than creating your own from scratch, use our collection of pre-made Google Sheets templatesย for various projects. Use the promo code SSP to save 50%ย on all templates.
Related:
- How to Format Cells in Google Sheets
- Conditional Formatting in Google Sheets (Easy Guide)
- How To Change the Date Format in Google Sheets