If formula help...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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")))
 
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"
 
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
 

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

copy down 9
IF ERROR FORMULA 1
Formula IF 1
SUMPRODUCT again! 5
Macro to copy data when data is detected in another column(s). 2
Help with a range formula 4
extract date if count formula 3
SUMPRODUCT 3

Back
Top