excel IF formula help

  Boy Zone 14:48 12 Dec 08

I'm trying to create an IF formula in excel 2003.

I want to compare two cells. If say A1 is greater than A2 then in A3 it shows the difference and displays the result number in GREEN, but if A2 is larger it displays the result in RED.

  VoG II 14:59 12 Dec 08

The formula to give the (absolute) difference is


Then select A3, Format > Conditional Formatting, select Formula Is and enter


click the Format button, choose a green font and click OK. Click the Add button, select Formula Is and enter


click the Format button, choose a red font and click OK twice.

  Simsy 18:48 12 Dec 08

what VoG™ has posted is, of course, correct, you do not HAVE to use CONDITIONAL formatting, you can just achieve it by using "ordinary" formatting for currency, or for numbers...

When you set a currency or number format you are presented with an option to have a negative value in red anyway... all you need to do is have the cell in question, (A3 in the example you give), with a green font, and have the formula =A1-A2

Obviously, if this doesn't involve money/number formats then you need to do what VoG™ has suggested!

Hope this makes sense!



  VoG II 20:09 12 Dec 08



will always return a positive number :o)

This thread is now locked and can not be replied to.

Sniper Elite 4 review: Headshotting Nazis has never felt so good

1995-2015: How technology has changed the world in 20 years

The Best Design, Illustration, Animation and VFX Awards of 2017

WWDC 2017 dates: How to get WWDC 2017 tickets, when is WWDC 2017 and more details announced