In this previous post I discussed conditional formatting in Google sheets.
The new version of Google Sheets offers the ability to extend this behaviour by writing a custom formula to handle your formatting. One of the key advantages this brings is the ability to base the formatting of your cell or cells on values stored in other cells.
To format using your custom formula, click the Format menu and select Conditional formatting….
Select the Custom formula is option in the drop-down menu.
Now you can enter the custom formula, rules, and cell range. Remember that you can enter as many rules as you need:
Click on Save rules.
In the above example, we are changing the background color of cell A1 depending on whether or not the value stored in cell B1 is greater than 10: