mardi 28 septembre 2021

Nesting multiple IFS

I have the following formula which works fine:

=IF(AND(Input!$G$54="",Input!$I$54="",Input!$K$54="",Input!$K$56),0,IF(AND(Input!$I$54="",Input!$K$54="", Input!$K$56=""),B20*Input!$G$54*Lookups!AF4,IF(AND(Input!$G$54="",Input!$K$54="", Input!$K$56=""),Lookups!AM2*$J$5*Lookups!AF4,IF(AND(Input!$G$54="",Input!$I$54=""),SUM(B20*Input!$K$54*Lookups!AF4,Lookups!AM2*$J$5*Lookups!AF4)))))

But I need to add the following condition to one of the equations, which appears twice in the formula.

=IF(Lookups!$A$O2<30,Lookups!AM2*$J$5*Lookups!AF4,0)

I've input dashes ------- where the above needs to go.

=IF(AND(Input!$G$54="",Input!$I$54="",Input!$K$54="",Input!$K$56),0,IF(AND(Input!$I$54="",Input!$K$54="", Input!$K$56=""),B20*Input!$G$54*Lookups!AF4,IF(AND(Input!$G$54="",Input!$K$54="", Input!$K$56=""),-------Lookups!AM2*$J$5*Lookups!AF4-------,IF(AND(Input!$G$54="",Input!$I$54=""),SUM(B20*Input!$K$54*Lookups!AF4,-------Lookups!AM2*$J$5*Lookups!AF4-------)))))

Whatever way I try to add this I get the 'not trying to type a formula' error. Please can someone help?

Aucun commentaire:

Enregistrer un commentaire