TASK_CLEAR is a function that clears all contents and formatting from a specified range of cells. It helps you quickly clean up sections of your spreadsheet without having to manually select and clear data.
=TASK_CLEAR(range, [sheet])
Parameter | Data Type | Required | Description |
---|---|---|---|
range |
|
Required | The cell range to clear (e.g., "A1:B10"). |
sheet |
|
Optional | The name of the sheet containing the range. If omitted, the active sheet is used. |
You can clear ranges in different sheets by specifying the sheet name:
=TASK_CLEAR("A1:B10", "Data Sheet")
This allows you to create workflows that clean up data across multiple sheets without needing to switch between them manually.
You can specify a single cell instead of a range:
=TASK_CLEAR("A1")
This will clear only that specific cell of its contents and formatting.
Clears all content and formatting from cells B5 through F20 in the active sheet.
=TASK_CLEAR("B5:F20")
Clears the range named
InputArea
Sales Data
=TASK_CLEAR("InputArea", "Sales Data")
Follow these steps to create a reset button for a data entry area:
=TASK_CLEAR("A1:Z100", "Data Entry")
Verify the range syntax (e.g., "A1:B10") is correct.
Check that the sheet name exists and is spelled correctly, including any spaces.
Ensure you're using the Run button in the Sheet Workflows sidebar to execute the function.
Make sure your range encompasses all cells you want to clear.
It only clears the contents and formatting. The cells themselves remain intact.
Yes, you can use Ctrl+Z (or Cmd+Z on Mac) to undo the clear operation.
Yes, it removes all contents including formulas, values, and notes.
No, this function clears both contents and formatting. Consider using Google Sheets' built-in Clear Formatting option for that specific need.
No, if a range is protected, TASK_CLEAR will return an error when attempting to clear it.
5 months ago