Conditionally Formatting Based on True/False Value

BrianExcel

Well-known Member
Joined
Apr 21, 2010
Messages
975
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

???
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
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?
 
Upvote 0
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
 
Upvote 0
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!
 
Upvote 0
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!
 
Upvote 0

Forum statistics

Threads
1,213,565
Messages
6,114,337
Members
448,568
Latest member
Honeymonster123

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