Reputation: 21
I want use nested IF with AND expression. But getting error. It is possible?
My example code: testing two values, if true return range,if not true test second two conditions if true return another range and so on...
=if(AND(Vstup!B16=150,Vstup!B17=0.8),{cennik!A4:G17},if(AND(Vstup!B16=150,Vstup!B17=1),{cennik!A26:G39))
Upvotes: 2
Views: 46
Reputation: 21910
You have a typo in your formula near the end - there is a missing }
:
=if(AND(Vstup!B16=150,Vstup!B17=0.8),{cennik!A4:G17},if(AND(Vstup!B16=150,Vstup!B17=1),{cennik!A26:G39}))
Upvotes: 1
Reputation: 1
try:
=INDEX(IF(AND(Vstup!B16=150; Vstup!B17=0.8); cennik!A4:G17;
IF(AND(Vstup!B16=150, Vstup!B17=1); cennik!A26:G39; )))
Upvotes: 0
Reputation: 33
Google Sheets formulas use semicolons as separators instead of commas.
Try this one:
=if(AND(Vstup!B16=150,Vstup!B17=0.8);{cennik!A4:G17};if(AND(Vstup!B16=150,Vstup!B17=1);{cennik!A26:G39))
Upvotes: 0