morinia
asked on
changing color font in Excel in if Statement - Excel 2010
Experts,
Is there a way to change the color of the font in an if statement relative to if the calculation is negative or positive.
I would like to put this statement in columnd d14
If (d14-AVERAGE($d14:$G14) < 0 then ...........
I would like to change the font in D14 to red if negative and green if positive.
Is there a way to change the color of the font in an if statement relative to if the calculation is negative or positive.
I would like to put this statement in columnd d14
If (d14-AVERAGE($d14:$G14) < 0 then ...........
I would like to change the font in D14 to red if negative and green if positive.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Barry,
You method works somewhat. With a formula situation, the only cell that's affected is D14. With you method, the whole range D14:G14 is affected.
As stated in the question, only D14 should be affected but not the average range.
You method works somewhat. With a formula situation, the only cell that's affected is D14. With you method, the whole range D14:G14 is affected.
As stated in the question, only D14 should be affected but not the average range.
Hello Harry,
That's true
I assumed that morinia would want to format the whole range so that each value will be coloured according to whether it's above or below average.....
...perhaps I'm wrong but morinia seemed happy with that solution :)
regards, barry
That's true
I assumed that morinia would want to format the whole range so that each value will be coloured according to whether it's above or below average.....
...perhaps I'm wrong but morinia seemed happy with that solution :)
regards, barry
In any case, after you solve that, use Conditional Formatting (new rule, based on formula, one for D14>-1, and one for D14 <0)