With the formula below, I keep receiving the error "Wrong number of arguments to IF. Expected between 2 and 3 arguments, but received 5 arguments."
Where have I gone wrong? It works up until a certain point and then the code throw up the above error... Am i missing a comma or bracket somewhere?
Any help greatly appreciated :)
=arrayformula(If(G5 <> "",if(H5 = "Y",if(C6 = "Sub-Total", ttime($M$3,vlookup(B5,Lookup!$A:$I,3,0)),if(AND(C7 = "Sub-Total",B6 <>"",B5 <>""),ttime($M$3,vlookup(B6,Lookup!$A:$I,3,0),vlookup(B5,Lookup!$A:$I,3,0)),if(AND(C8 = "Sub-Total",B7 <> "", B6 <> "",B5 <>""),ttime($M$3,vlookup(B7,Lookup!$A:$I,3,0),vlookup(B6,Lookup!$A:$I,3,0),vlookup(B5,Lookup!$A:$I,3,0)),if(AND(C9 = "Sub-Total",B8 <> "", B7 <> "",B6 <>"",B5 <> ""),ttime($M$3,vlookup(B8,Lookup!$A:$I,3,0),vlookup(B7,Lookup!$A:$I,3,0),vlookup(B6,Lookup!$A:$I,3,0)),vlookup(B5,Lookup!$A:$I,3,0)),if(AND(C10 = "Sub-Total",B9 <> "", B8 <> "",B7 <>"",B6 <> "",B5 <> ""),ttime($M$3,vlookup(B9,Lookup!$A:$I,3,0),vlookup(B8,Lookup!$A:$I,3,0),vlookup(B7,Lookup!$A:$I,3,0)),vlookup(B6,Lookup!$A:$I,3,0)),vlookup(B5,Lookup!$A:$I,3,0))))+IF(C6 = "sub-total","",if(B5 <> "", G6 * 3,""))+IF(C6 = "sub-total","",if(B5 <> "", "15","")),"Not Despatched"),""))
Aucun commentaire:
Enregistrer un commentaire