I have the below two excel formulas that I am trying to combine into one statement.
=IF(U1="","",IF(AND(T1="SHIFT",U1>=210,I1="BURNABY"),"SHOT20","SHOT10"))
=IF(U1="","",IF(AND(T1="SHIFTP",U1<480),"SHOT10","SHOT15"))
When I tried I am getting an error that I am making too many arguments.
=IF(U1="","",IF(AND(T1="SHIFT",U1>=210,I1="BURNABY"),"SHOT20",IF(U1="","",IF(AND(T1="SHIFTP",U1<480),"SHOT10","SHOT15"))))
Try the above
I was able to find a workable solution
=IF(I1="burnaby",IF(AND(T1="shift",U1>=210),"shot20","shot10"),IF(AND(T1="shiftfp",U1<480),"shot10","shot15"))
Related
I'm trying to create a spreadsheet with nested if and statements but I keep getting a too many arguments error (despite using an example I found online). Can anyone see where I'm going wrong? I've been googling fruitlessly for a while!
= IF(AND(D5>=$M$3, E5<=$M$4),
F5,
IF(AND(D5>=$M$3, D5<=$M$4),
NETWORKDAYS(D5, $M$4, ($U$5:$U$68),
IF(AND(E5>=$M$3, E5<=$M$4),
NETWORKDAYS($M$3, E5, ($U$5:$U$68))))
Your NETWORKDAYS formulas are incorrect:
You have:
NETWORKDAYS(D5,$M$4,($U$5:$U$68)
should be:
NETWORKDAYS(D5,$M$4,$U$5:$U$68)
although
NETWORKDAYS(D5,$M$4,($U$5:$U$68))
would also work, but the parentheses around the holidays argument are redundant.
I can get a two possibility formula to work but not a three. I thought it would just be adding a comma for another term then adding a comma for a value. Please can anyone tell me why its not working?
Working one:
=IF(OR(C6="buy", C6="hold"),(F5*(D6+1)),(E5*(D6+1)))
Not Working:
=IF(OR(C6="buy", C6="hold", c6="sell"),(F5*(D6+1)),(E5*(D6+1)),0)
After reading your problem description couple of times over I think you need below formula:
=CHOOSE(MATCH(C6,{"buy","hold","sell"},0),(F5*(D6+1)),(E5*(D6+1)),0)
In your second formula you have two parts (E5*(D6+1)) and 0 for the Value is False section, this version will work: =IF(OR(C6="buy", C6="hold", C6="sell"),(F5*(D6+1)),(E5*(D6+1)))
I was just wondering if this is the proper way to nest this many conditions. It does work, just looks like it could be written simpler.
=IF(H13>0,IF(H14>0,IF(H15>0,IF(H16>0,IF(H17>0,IF(H18>0,IF(H19>0,"Yes","No"),"No"),"No"),"No"),"No"),"No"),"No")
Above formula can be written as
=IF(COUNTIF(H13:H19,">0")=7,"Yes","No")
You can use AND
=IF(AND(H13>0,H14>0,H15>0,H16>0,H17>0,H18>0,H19>0),"Yes","No")
Also use OR
=IF(OR(H13<=0,H14<=0,H15<=0,H16<=0,H17<=0,H18<=0,H19<=0),"No","Yes")
I am trying to combine two forumlas into one.
They both work individually and I would like to make it so the condition is only met if both formulas are met. The forumlas are:
=IF(AND(Sheet2!$C$6>40,Sheet2!$C$6<=50),TRUE,FALSE)
=IF((INDIRECT(SUBSTITUTE(ADDRESS(1,COLUMN(),4),"1","3"))>=Sheet2!$B$6),TRUE,FALSE)
I have tried to use another AND clause but had no luck yet with this, would anyone be able to provide a consolidated formula for both of these?
the long way:
=IF(AND(Sheet2!$C$6>40,Sheet2!$C$6<=50,INDIRECT("R3C"&COLUMN(),)>=Sheet2!$B$6), TRUE, FALSE)
the short way:
=AND(Sheet2!$C$6>40,Sheet2!$C$6<=50,INDIRECT("R3C"&COLUMN(),)>=Sheet2!$B$6)
also possible:
=((Sheet2!$C$6>40)*(Sheet2!$C$6<=50)*(INDIRECT("R3C"&COLUMN(),)>=Sheet2!$B$6))=1
why the SUBSTITUTE(ADDRESS(1,COLUMN(),4),"1","3")??? just ADDRESS(3,COLUMN(),4) will be the same... also why address at all? justINDIRECT("R3C"&COLUMN(),) will also work
Compiling the comments, this should be the minimal formula gathering your tests :
=AND(Sheet2!$C$6>40,Sheet2!$C$6<=50,INDIRECT(SUBSTITUTE(ADDRESS(1,COLUMN(),4),"1","3"))>=Sheet2!$B$6)
I need help in combining two IF condition statements in excel. Both are working fine, just that when I try to combine them then I'm getting error. Below are the conditions:
=IF(AND(F19="No", NOT(OR(ISBLANK(B36),ISBLANK(B37),ISBLANK(D36),ISBLANK(D37),ISBLANK(B40),ISBLANK(D39),ISBLANK(F39),ISBLANK(D40),ISBLANK(F40),ISBLANK(B43),ISBLANK(B44),ISBLANK(B48),ISBLANK(B49),ISBLANK(B50),ISBLANK(B51),ISBLANK(B52)))),"Section Complete","Section Incomplete")
=IF(AND(F19="Yes", NOT(OR(ISBLANK(B36),ISBLANK(B37),ISBLANK(D36),ISBLANK(D37),ISBLANK(B40),ISBLANK(D39),ISBLANK(F39),ISBLANK(D40),ISBLANK(F40),ISBLANK(B43),ISBLANK(B44),ISBLANK(B48),ISBLANK(B49),ISBLANK(B50),ISBLANK(B51),ISBLANK(B52),ISBLANK(D43),ISBLANK(D44),ISBLANK(D45),ISBLANK(D46),ISBLANK(D47),ISBLANK(D48),))),"Section Complete","Section Incomplete")
Please help me in combining them.
Thanks in advance, Krishna
... I didn't try and make it prettier / more efficient - I just used your original formulas, but this should do what you want:
=IF(OR(AND(F19="No", NOT(OR(ISBLANK(B36),ISBLANK(B37),ISBLANK(D36),ISBLANK(D37),ISBLANK(B40),ISBLANK(D39),ISBLANK(F39),ISBLANK(D40),ISBLANK(F40),ISBLANK(B43),ISBLANK(B44),ISBLANK(B48),ISBLANK(B49),ISBLANK(B50),ISBLANK(B51),ISBLANK(B52)))),AND(F19="Yes", NOT(OR(ISBLANK(B36),ISBLANK(B37),ISBLANK(D36),ISBLANK(D37),ISBLANK(B40),ISBLANK(D39),ISBLANK(F39),ISBLANK(D40),ISBLANK(F40),ISBLANK(B43),ISBLANK(B44),ISBLANK(B48),ISBLANK(B49),ISBLANK(B50),ISBLANK(B51),ISBLANK(B52),ISBLANK(D43),ISBLANK(D44),ISBLANK(D45),ISBLANK(D46),ISBLANK(D47),ISBLANK(D48))))),"Section Complete","Section Incomplete")
Hope this does the trick!!
You could just as simple replace the "Section incomplete" in the first No-IF, by replacing it with the Yes-IF.
=IF(AND(F19="No";NOT(OR(ISBLANK(B36);ISBLANK(B37);ISBLANK(D36);ISBLANK(D37);ISBLANK(B40);ISBLANK(D39);ISBLANK(F39);ISBLANK(D40);ISBLANK(F40);ISBLANK(B43);ISBLANK(B44);ISBLANK(B48);ISBLANK(B49);ISBLANK(B50);ISBLANK(B51);ISBLANK(B52))));"Section Complete";IF(AND(F19="Yes";NOT(OR(ISBLANK(B36);ISBLANK(B37);ISBLANK(D36);ISBLANK(D37);ISBLANK(B40);ISBLANK(D39);ISBLANK(F39);ISBLANK(D40);ISBLANK(F40);ISBLANK(B43);ISBLANK(B44);ISBLANK(B48);ISBLANK(B49);ISBLANK(B50);ISBLANK(B51);ISBLANK(B52);ISBLANK(D43);ISBLANK(D44);ISBLANK(D45);ISBLANK(D46);ISBLANK(D47);ISBLANK(D48);)));"Section Complete";"Section Incomplete"))
Try simplifying with some COUNTA functions like this:
=IF(AND(COUNTA(B36,B37,D36,D37,B40,D39,F39,D40,F40,B43,B44,B48:B52)=16,OR(F19="No",AND(F19="Yes",COUNTA(D43:D48)=6))),"Section Complete","Section Incomplete")
That should combine the two formulas without repetition