We help IT Professionals succeed at work.

Excel change font color in formula

3,815 Views
Last Modified: 2017-03-10
I need the following formula to show in RED if it is a negative number.

="Budget Variance For Capital Project = "&TEXT('SSG 2017 Orders'!AY2,"[$$ -409]#,##0.00")
Comment
Watch Question

ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
Try below:
="Budget Variance For Capital Project = "&TEXT('SSG 2017 Orders'!AY2,"#,##0_ ;[Red]-#,##0 ")

Open in new window

ssblueCoordinator

Author

Commented:
Nope and it took away the dollar sign.
ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
Try below:
="Budget Variance For Capital Project = "&TEXT('SSG 2017 Orders'!AY2,"[$$-409]#,##0.00_ ;[Red]-[$$-409]#,##0.00 ")

Open in new window

ssblueCoordinator

Author

Commented:
Sorry, got the dollar sign back but no red font.
ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
OK try this:
="Budget Variance For Capital Project = "&TEXT('SSG 2017 Orders'!AY2,"$ #,##0.00;[Red]-$ #,##0.00")
ssblueCoordinator

Author

Commented:
Still not turning red????
ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
Do not use text function, just use your normal formula:
="Budget Variance For Capital Project = "&'SSG 2017 Orders'!AY2
Then Format Cell to [$$-409]#,##0.00_ ;[Red]-[$$-409]#,##0.00
ssblueCoordinator

Author

Commented:
That's not working either.
ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
Other way would be;
Using your original formula:
="Budget Variance For Capital Project = "&TEXT('SSG 2017 Orders'!AY2,"[$$ -409]#,##0.00_ ;[Red]-[$$ -409]#,##0.00")
Conditional Formatting as below using formula =Left(H10,1)="-" then format as red font
Negative To Red
ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
Of course you need to change H10 as per your cell, where you are having the formula
ssblueCoordinator

Author

Commented:
Still not working for me. Not sure what is going on??
ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
Can you upload your file? or send me in pm
ssblueCoordinator

Author

Commented:
it works if I take out the text part of the formula.
ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
Finally. Thank God.
That what I proposed earlier:
Do not use text function, just use your normal formula:
="Budget Variance For Capital Project = "&'SSG 2017 Orders'!AY2
Then Format Cell to [$$-409]#,##0.00_ ;[Red]-[$$-409]#,##0.00
ssblueCoordinator

Author

Commented:
That doesn't work.  The only time I get RED is when there is NO text involved.
Managing Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
ssblueCoordinator

Author

Commented:
Got it!  :)  Thanks!
ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
You're Welcome ssblue! Glad eventually I was able to help :)
ShumsManaging Director/Excel VBA Developer
CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
The problem was you were using ="Budget Variance For Capital Project = " at the beginning. Format Cell was not treating it as negative.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions