Change Font colour using Excel function IF

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Good day everybody

I hope some one can help me on this

I have a column A with value and a column B to show status
Column B is with a IF statement as this : =IF(A<0,"Bad","Good"
This means if A is +ve or 0, B will show Good
If A is -ve, B will show Bad

This is working alright. Now, the challenge is ....
How to make "Good" as Font in Green and "Bad" as Font in Red

I hope some one have a solution to this.

Thank you in advance and have a great Easter day

Best regards
Julie
 
Perhaps some steps for you to experiment with as well ?

Assuming your formula in B2 is

: =IF(ISBLANK(A2),"",IF(A2<0,"Bad","Good"))

(Slightly amended the formula mentioned in your post,
to cater for the possibility that A2 might not contain any value)

The formula in B2 is assumed copied down col B
--

Select B2

Click Format > Conditional Formatting (CF)

Under Condition1, make the settings:
Cell Value is | equal to | ="Good"
Click Format button > Font tab > Green & Bold > OK

Click "Add>>" button
(this adds the 2nd condition)

Under Condition2, make the settings:
Cell Value is | equal to | ="Bad"
Click Format button > Font tab > Red & Bold > OK

Click OK at the main dialog

That should do it.

Test with some values in A2 (>0, 0, <0, etc)
to invoke corresponding values and CF in B2

Clear A2 by pressing the Delete key
- there should be no value / formatting in B2

------------

To copy the conditional formatting down col B

Select the formatted cell B2

Double-click on the Format Painter icon ("brush")
[cursor will turn into "brush"]

Click to select [i.e. "paint"] over the range say, B3:B100

Press Esc to revert the cursor to normal when done
 
Hello Julie

look in "Format" tab.
there you'll find "Conditional formatting".
you can set a condition that will cause an event to happen
(for example if value="Good" than font color="green").

Good luck, tal.
 
Back
Top