Are there too many arguments

P

Pat

There is nothing wrong with the following formula:
=IF(B75=CHAR(252),J75,"")

What I want to do is add another argument to the formula as follows:
=IF(B74=CHAR(252),J74,"",IF(J74>0,K22="QS"),0,J74)))

Many thanks if you can be of help.
Pat
 
J

JulieD

Hi Pat

an IF statement has only three parameters Test, True, False
you've tried for six
Test, True, False,Test,True,False

you can nest other IF statements within an IF statement in the following way
=IF(Test1,IF(Test2,True,False),IF(Test3,True,False))
here there's a IF statement (test2) in the true bit of Test1 and other one
in the false bit of Test1

however, i'm not sure when you want the second IF evaluated - do you want it
evaluated IF B74=Char(252)
e.g.
=IF(B75=CHAR(252),IF(J74>0,K22="QS",J74),"")

(you also had 4 parameters in this IF statement so i've taken 1 out)

Cheers
JulieD
 
A

AlecHull

Also the K22="QS" part is not clear - is this a tested condition or a
desired result? I think it's the second of a two-part test -- if so you can
use the AND function (or the OR function) to test them together. You might
be looking for this:

=IF(B74=CHAR(252),J74,IF(AND(J74>0,K22="QS"),0,J74))

but I'm not sure when you want to return "". Try different nesting schemes
as JulieD mentioned.
 
P

Pat

Thank you both for helping me out, the correct solution I was after is as
follows:

=IF(B78=CHAR(252),J78,IF(OR(J78>0,K22="QS"),0,J78))

Pat
 

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

Top