Use for questions about conditionally changing the formatting of ranges in Google Sheets spreadsheets, either programmatically via Google Apps Script or via UI inasmuch as the question is about using formulas as conditions.
About
Conditional formatting is a technique used to format text or background color of ranges when they match certain criteria. In the context of Google Sheets, it can be achieved either by using Google Apps Script or providing a custom formula as a condition in the UI.
Use for questions
About programmatic creation and management of conditional formatting rules in google-sheets either via google-apps-script or custom formulas. For latter use with google-sheets-formula tag.
Do not use for questions
About conditional formatting in Excel, use excel + conditional-formatting instead.
via custom formulas
Custom formulas for conditional formatting are added via the "Add new rule" > "Custom formula is" menu by selecting a "Value or formula" option.
Custom formulas in conditional formatting are limited to the sheet they are applied to. If you need to reference another sheet, use =INDIRECT
formula.
via Google Apps Script
SpreadsheetApp
service offers several methods for programmatically creating and managing conditional formatting rules:
a set of utility classes for building rules and conditions:
and several enums for condition options:
Useful resources
- Support portal guide