COnditional format cell based on results from a formula

temakhafola

New Member
Joined
Apr 13, 2016
Messages
19
Hi All,

This is a formula I used =IF(C11<=2;"1";IF(C11=3;"2";if(C11>=4;"3"))), I now want to conditionally format the cells based on the results of this formula like if I get 1 the cell must be red, if 2 the cell must amber and if I get 3 then the cell must be green.
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
You will need to break it out into 3 CF items. Then just split out your 3 formulas an apply the colors (formatting) you want based upon a true result.

So for the 1st one as an example you could put this into your CF formula:
Code:
=C11<=2
Then set the formatting based on that being true.

Then do the other 2 formulas as a 2nd and 3rd CF formula test.

Phil
 
Upvote 0
Am I missing something? Why wouldn't you select the range and apply the 3 types of conditional formatting?
 
Upvote 0
Conditional formatting doesn't work that way unfortunately. You can only pick one color per rule/condition. That rule can still apply to the full range. So like Phil said, you need to split this formula up into 3 separate rules.
 
Upvote 0
I have three rules here...what am I not understanding?

Clip0026.jpg


Clip0027.jpg
 
Upvote 0
Kweaver, you can only test for a True/False as part of CF, so from my understanding you can't use an IF statement for that. Plus we can only implement one formatting type for a T/F result so how would you select different colors in 1 CF test? The answer is you can't that is why you need the 3 CF formulas so you can apply the different colors, hope that makes sense.

I hope we helped the OP as well.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,953
Messages
6,175,598
Members
452,658
Latest member
GStorm

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top