Tip: You can use the same method to change the font color based on the cell's value. What you have now is a nicely formatted table that lets you see the highest and lowest gas prices across different states at a glance. Here is the Preview of our second conditional formatting rule: change the background of cells with values equal to or less than 3.45 to the green color, click the New Rule button again and repeat steps 3 - 6 setting the required condition. Since we need to apply one more condition, i.e. The result of your formatting will look similar to this: If everything is Okay, click the OK button. Now you are back to the New Formatting Rule window and the preview of your format changes is displayed in the Preview box.In the Format Cells dialog box, switch to the Fill tab and select the color of your choice, the reddish color in our case, and click OK.
Then click the Format… button to choose what background color to apply when the above condition is met. We choose to format only cells with a Cell Value - greater than - 3.7, as you can see in the screenshot below. In the lower part of the dialog box under " Format Only Cells with section", set the rule conditions.In the New Formatting Rule dialog box, select " Format only cells that contain" under " Select a Rule Type" box in the upper part of the dialog box.Navigate to the Home tab, Styles group, and choose Conditional Formatting > New Rule….
In this example, we've selected $B$2:$H$10 (the column names and the first column listing the state names are excluded from the selection).
#EXCEL IF THEN FORMULA COLOR CELL HOW TO#
How to change a cell's color based on value in Excel dynamically Change color of special cells (blanks / with errors / with formulas).