Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Event hundler to control the Excel function arguments | Excel Worksheet Functions | |||
How to specify almost full-column arguments like A3:A | Excel Discussion (Misc queries) |