How can I show the difference (+ or -) between two cells in Excel

R

Revelp

I need to show the difference either plus or minus between two cells..i.e...
Col.1 is 10.00, Col.2 is 20.00, Col.3 needs to say that Col.2 is 10.00 over
what Co.1 is...Col.1 is the alloted budget number, Col.2 is the amount
actually spent, Col.3 needs to show the amount either over (+) or under (-)
Col.1's number.
thanks.
 
P

Peo Sjoblom

=IF(Count(A2:B2)=2,A2-B2,"")

you can select custom format and use

0.00 "Over";0.00 "Under"

or

+ 0.00;- 0.00


--


Regards,


Peo Sjoblom
 
R

Rick Rothstein \(MVP - VB\)

If you are looking to do this with a formula (rather than Peo's suggested
cell formatting, which I think is the better approach), you could use
something like this...

=CHOOSE(SIGN(A1-B1)+2,ABS(A1-B1)&" Over","Right on budget!",ABS(A1-B1)&"
Under")

or this (depending on what you want to display if they are equal)...

=ABS(A1-B1)&CHOOSE(SIGN(A1-B1)+2," Over",""," Under")

Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top