Avatar of ssblue
ssblue
Flag for United States of America asked on

Excel change font color in formula

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")
Microsoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
Shums Faruk

8/22/2022 - Mon
Shums Faruk

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

Open in new window

ssblue

ASKER
Nope and it took away the dollar sign.
Shums Faruk

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

Open in new window

Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
ssblue

ASKER
Sorry, got the dollar sign back but no red font.
Shums Faruk

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

ASKER
Still not turning red????
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Shums Faruk

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
ssblue

ASKER
That's not working either.
Shums Faruk

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
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Shums Faruk

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

ASKER
Still not working for me. Not sure what is going on??
Shums Faruk

Can you upload your file? or send me in pm
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ssblue

ASKER
it works if I take out the text part of the formula.
Shums Faruk

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
ssblue

ASKER
That doesn't work.  The only time I get RED is when there is NO text involved.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
ASKER CERTIFIED SOLUTION
Shums Faruk

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ssblue

ASKER
Got it!  :)  Thanks!
Shums Faruk

You're Welcome ssblue! Glad eventually I was able to help :)
Shums Faruk

The problem was you were using ="Budget Variance For Capital Project = " at the beginning. Format Cell was not treating it as negative.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.