Formula to change font color if condition is true

sro1992

New Member
Joined
Mar 12, 2013
Messages
1
Hello,

How can I create a formula that changes the font color of a 3rd cell? For example, I have 2 cells where I am taking A1-B1 and displaying the result in C1. How can I make it so that if A1 is grater than B1 then C1 is in red font? I am using time values so I my negative values are displaying wired to a point where it is unreadable.

To further the point, my spreadsheet looks similar to this:

Time 1 Time2 Time1-Time2
0:02:05 0:01:05 0:01:00
0:01:05 0:02:05 (-value)

I want a formula that wll state if Time2 > Time1, then Time1-Time2 cell is red font.

Hope this makes sense.

Any help would be appreciated.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Click on your output cell (C1), then click on conditional formatting under the Home tab. Click on "New Rule", then on "Format only cells that contain". In the Rule Description area, the first drop down box should be "Cell Value", the next shoudl be "Less Than", and the third, type 0. Then click the format button right below that and set the font color to red (or whatever color you want). Now click OK and apply, then copy that cell to all other cells you want to format like that.
 
Upvote 0
If you don't care that it is still going to display # signs for your negative time, you can just use a custom number format of:

h:mm:ss;[Red]h
 
Upvote 0

Forum statistics

Threads
1,215,636
Messages
6,125,961
Members
449,276
Latest member
surendra75

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