Need help with a formula

G

Guest

I am having trouble with a subtraction formula, Hoping someone can help.
A2 is -200
B2 is 100
C2 needs the formula
What I have is =A2-B2*sign(A2) which works until A2 is 0, then it doesn't
subtract the cells, C2 becomes 0
Can anyone help with this formula.
Thanks
 
R

Ron Rosenfeld

I am having trouble with a subtraction formula, Hoping someone can help.
A2 is -200
B2 is 100
C2 needs the formula
What I have is =A2-B2*sign(A2) which works until A2 is 0, then it doesn't
subtract the cells, C2 becomes 0
Can anyone help with this formula.
Thanks

What are you trying to accomplish with this formula?

Perhaps if you give examples of the various contents of A2 and B2 and tell us
what you want to see as a result in C2?

-200 100 ?
-150 100 ?
-100 100 ?
-50 100 ?
0 100 ?
50 100 ?
100 100 ?
150 100 ?
200 100 ?


--ron
 
M

mikerickson

=A2-IF(A2<0,-B2,B2) or
=IF(A2<0,A2+B2,A2-B2)

Pat;501133 said:
I am having trouble with a subtraction formula, Hoping someone can
help.
A2 is -200
B2 is 100
C2 needs the formula
What I have is =A2-B2*sign(A2) which works until A2 is 0, then it
doesn't
subtract the cells, C2 becomes 0
Can anyone help with this formula.
Thanks
 
G

Guest

maybe
=if(A1=0,-B1,(Abs(A1)-B1)*sign(A1))
or using your equation
=if(A1=0,-B1,A1-B1*sign(A1))
 

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

Need help for a formula 5
formula not calculating correctly 2
Help with Formula 4
Problem calculating 1
I need a formula 2
Please help with a date formula. 3
Multiple IF Need Help 4
help with formula 1

Top