Share via

Conditional formatting based on result in another cell

Anonymous
2013-08-21T13:06:45+00:00

I want to color cell E6 based on results in cell F6. If F6 <0,002 then the color should be red - if F6 <0,005 then the color should be blue - if F6 =>0,005 the color should be green. 

Then I have a whole lot of results in the rows underneath with the same problem. How can I make a rule that does this easily colors cell E6 and all the cells in column E under....

Thanks if anyone can help...

All the best from Kathrine

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2013-08-21T13:34:58+00:00

Select the cells that you want to format, say E6:E100.

On the Home tab of the ribbon, click Conditional Formatting >Manage Rules...

Click New Rule...

Select the option 'Use a formula to determine which cells to format'.

Enter the formula   =F6>=0,005

Click Format...

Specify green as the desired font or fill color, then click OK twice.

Repeat the above steps, but now with formula  =F6<0,005   and blue.

Finally, repeat them again with   =F6<0.002   and red.

Back in the Conditional Formatting Rules Manager, tick the check box "Stop If true" for the rule at the top (the one for red), then click OK.

Was this answer helpful?

3 people found this answer helpful.
0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2013-09-02T23:27:16+00:00

If you don't tick the check box "Stop if true", Excel will evaluate each rule in the list, starting at the top and working downwards, and apply each one for which the condition is true.

So for example, if F6 is 0,001, the first condition =F6<0,002 is true so E6 is colored red. But the second condition =F6<0,005 is true too so the cell is colored blue.

Ticking the check box "Stop if true" makes Excel stop evaluating the rules at the first condition that evaluates to True.

In the above example, since the first condition is True, the second condition won't be evaluated. So the cell remains red.

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2013-09-02T22:28:20+00:00

    Thanks! Just a quick note - why must I tick the check box "Stop if true" - what does that actually do?

    Was this answer helpful?

    0 comments No comments