Show "+" (plus) sign when comparing two values

F

filpass

Dear Excel experts,

I am comparing the values of cells in two columns: if difference B1-A1 is
<0, then the minus sign logically appears before the value.

But how can I make a "+" sign appear when difference B1-A1 > 0?

A thousand of thanks for your help!
 
W

Warren Easton

Try
=IF(B1-A1>0,"+"&B1-A1,B1-A1)
--
Regards
Warren
Excel Novice
Addiewell, Scotland.

If this helps please click the Yes button.
 
M

Mike H

Hi warren,

While your method works to an extent I wouldn't use it because it can cause
problems with logical comparisons.

Try my formatting method in c1 and your method in d1 then do a logical
compare back to the 2 original numbers in a1 & b1

Your method in d1 evaluates as false
=D1=B1-A1

The format method in c1 evaluates as true
=C1=B1-A1

Mike
 
W

Warren Easton

Thank You for the Feedback
--
Regards
Warren
Excel Novice
Addiewell, Scotland.

If this helps please click the Yes button.
 

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

Similar Threads


Top