how to conditional format based on another cell google sheets code example

Example 1: google sheet color one column based on another column

Highlight Cells Using Conditional Formatting Based on Another Cell Value in Google Sheets
Select the cells that have the names (A2:A11).
Go to the Format Tab.
Click on Conditional Formatting.
In the Conditional Formatting rules pane, select Single Color.
From the 'Format Cells if' drop down, select 'Custom Formula is'.
Add your formula e.g. '=b2<15'
Select color for the condition match

Example 2: google sheets conditional formatting custom formula current cell

The current cell is addressed by the first cell of a range in the conditional formatting. In your example, the range is A4:M10 and therefore you can use A4 as "current cell".

Check for empty content:
=A4=""

Tags:

Misc Example