if equation

R

Robert

i am trying to come up with a formula that will subtract if the value in one
cell is negative or will add if the value in the same cell is positive
 
S

Sloth

add or subtract what? Please be detailed with your questions, otherwise we
are stabbing at the dark. These examples might help you. If not, then
please provide the input data you have and the outcome you want.

Example 1:
A1 12
A2 -4
A3 =A1+A2
this will subtract A2 from A1 resulting in 8

Example 2:
A1 12
A2 3
A3 -67
A4 =A1+A2*A3/ABS(A3)
this will subtract A2 from A1 resulting 9
 
K

kjs

Robert said:
i am trying to come up with a formula that will subtract if the value in
one
cell is negative or will add if the value in the same cell is positive

A1=2; A2=3
A3=A1+A2*SIGN(A2)
Now put a negative in A2.

kjs
 
Top