Create a custom conditional formatting rule
- Select the range of cells, the table, or the whole sheet that you want to apply conditional formatting to.
- On the Home tab, click Conditional Formatting.
- Click New Rule.
- Select a style, for example, 3-Color Scale, select the conditions that you want, and then click OK.
What is the formula for conditional formatting in Excel?
In a similar fashion, you can create a conditional formatting rule to compare values of two cells. For example: =$A2<$B2 - format cells or rows if a value in column A is less than the corresponding value in column B. =$A2=$B2 - format cells or rows if values in columns A and B are the same.
How do I automatically color cells in Excel based on value?
On the Home tab, in the Styles group, click Conditional Formatting > New Rule… (see step 2 of How to dynamically change a cell color based on value for step-by-step guidance). In the "New Formatting Rule" dialog, select the option "Use a formula to determine which cells to format".