If formula help...

J

Jambruins

I want a formula in cell S2 to do the following...

If R2 = W and Q2 is a positive number display Q2.
If R2 = W and Q2 is a negative number display 100.
If R2 = L and Q2 is a positive number display -100.
IF R2 = L and Q2 is a negative number display Q2.

What formula would I use for this? Thanks.
 
J

JulieD

Hi

does the following formula give you what you want?

=IF(OR(AND(R2="W",Q2>0),AND(R2="L",Q2<0)),Q2,IF(AND(R2="W",Q2<0),100,IF(AND(R2="L",Q2>0),-100,"check
entry")))
 
D

Don Guillett

break it down and then put it together


if(r2="w",if(q2>=0,q2,100),if(r2="l",(if(q2>0,-100,q2)))
or another way
if(q2>0,if(r2="w"
 
B

bj

try
=if(r2="W",if(Q2>0,Q2,100),if(Q2>0,-100,Q2))
you may need to play with Q2>0 to be Q2>=0
If R2 can be something other than W or L you may have to add to the equation
 
Top