Conditionally Formatting Based on True/False Value

BrianExcel

Well-known Member
Joined
Apr 21, 2010
Messages
969
How would I write a formula (non-vba please) that says:

If the sum of B4+B5>15, then display as red text OR if the sum of B4+B5<=15 then display as green text

???
 

Some videos you may like

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Oaktree

MrExcel MVP
Joined
Jun 20, 2002
Messages
7,994
Are you looking to change the font color of B4 & B5? Or, do you have e.g. B6 = B4+B5 and you're looking to change the font color of B6?
 

Cease

Board Regular
Joined
Dec 28, 2010
Messages
112
If you are using excel 2007 or 2010 from the Home Tab you can choose the conditional formatting and set up a new rule.

From there you can choose to "Use a formula to determine which cells to format", then use
=if(b4+b5>15,true,false)
then have the format set to Red text (or a red box if you want, the options are pretty deep).

Then you'd have to set up a second conditional format
=if(b4+b5<=15,true,false)

Hope this helps :D
 

BrianExcel

Well-known Member
Joined
Apr 21, 2010
Messages
969
It's a pain, but I actually just wound up doing two conditional formats for the coloring. The value I want to base the condition on is cell B6, so I basically said

if the value is > B5, then red. Else green.

Thanks!
 

T. Valko

Well-known Member
Joined
May 9, 2009
Messages
16,623
If you are using excel 2007 or 2010 from the Home Tab you can choose the conditional formatting and set up a new rule.

From there you can choose to "Use a formula to determine which cells to format", then use
=if(b4+b5>15,true,false)
then have the format set to Red text (or a red box if you want, the options are pretty deep).

Then you'd have to set up a second conditional format
=if(b4+b5<=15,true,false)

Hope this helps :D
You can reduce those formulas to:

=B4+B5>15

=B4+B5<=15

However, you might need/want to account for empty cells!
 

Watch MrExcel Video

Forum statistics

Threads
1,123,530
Messages
5,602,200
Members
414,513
Latest member
junbuggle

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
Top