Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Pat
 
Posts: n/a
Default Are there too many arguments

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(J740,K22="QS"),0,J74) ))

Many thanks if you can be of help.
Pat


  #2   Report Post  
JulieD
 
Posts: n/a
Default

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(J740,K22="QS",J74),"")

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

Cheers
JulieD


"Pat" wrote in message
...
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(J740,K22="QS"),0,J74) ))

Many thanks if you can be of help.
Pat



  #3   Report Post  
AlecHull
 
Posts: n/a
Default

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(J740,K22="QS"),0,J74 ))

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


"JulieD" wrote:

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(J740,K22="QS",J74),"")

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

Cheers
JulieD


"Pat" wrote in message
...
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(J740,K22="QS"),0,J74) ))

Many thanks if you can be of help.
Pat




  #4   Report Post  
Pat
 
Posts: n/a
Default

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

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

Pat

"AlecHull" <alechull-aol-com wrote in message
...
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(J740,K22="QS"),0,J74 ))

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


"JulieD" wrote:

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(J740,K22="QS",J74),"")

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

Cheers
JulieD


"Pat" wrote in message
...
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(J740,K22="QS"),0,J74) ))

Many thanks if you can be of help.
Pat






  #5   Report Post  
JulieD
 
Posts: n/a
Default

Hi Pat

glad you figured out your formula - thanks for the feedback

Cheers
JulieD

"Pat" wrote in message
...
Thank you both for helping me out, the correct solution I was after is as
follows:

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

Pat

"AlecHull" <alechull-aol-com wrote in message
...
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(J740,K22="QS"),0,J74 ))

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


"JulieD" wrote:

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(J740,K22="QS",J74),"")

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

Cheers
JulieD


"Pat" wrote in message
...
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(J740,K22="QS"),0,J74) ))

Many thanks if you can be of help.
Pat








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Event hundler to control the Excel function arguments Yattabi Excel Worksheet Functions 0 December 6th 04 10:41 PM
How to specify almost full-column arguments like A3:A TimRegan Excel Discussion (Misc queries) 3 December 3rd 04 05:18 PM


All times are GMT +1. The time now is 09:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"