I am trying to use the following formula:
=if(A16="1",(COUNTIF('responses'!AF:AG,B16))>0,"Yes",if(A16="2",(COUNTIF('responses 1'!AF:AG,B16)))>0,"Yes",COUNTIF(' responses'!D:E,B16)>0,"Yes","No")
Basically I'm getting a message back saying there are too many arguments. This is the first time I have tried to use if nested if and countif functions and I'm really struggling. Any help greatly appreciated.
CodePudding user response:
try:
=IF(A16="1",
IF(COUNTIF('responses'!AF:AG, B16)>0, "Yes",
IF(A16="2",
IF(COUNTIF('responses 1'!AF:AG, B16)>0, "Yes",
IF(COUNTIF(' responses'!D:E, B16)>0, "Yes", "No")
CodePudding user response:
would this work?
=if(A16="1",COUNTIF('responses'!AF:AG,B16))>0,"Yes", "No", (if(A16="2",(COUNTIF('responses 1'!AF:AG,B16)))>0,"Yes", "No"),COUNTIF(' responses'!D:E,B16)>0,"Yes","No"