Home > Enterprise >  combine more IF(OR Google sheet formula
combine more IF(OR Google sheet formula

Time:04-29

I have this problem , in a google sheet's cell I have put inside this formula:

=IF(OR(AND(F21>"01/05/2022";F21<"31/05/2022");AND(G21=2;));$J$4;"errore");

and this run correctly. but now I would combine this formula with another in the same cell i.e.

=IF(OR(AND(F21>"01/05/2022";F21<"31/05/2022");AND(G21=2;));$J$4;"errore");IF(OR(AND(F21>"01/06/2022";F21<"30/06/2022");AND(G21=3;));$K$4;"errore");

could you help me to made this without errore please? thanks a lot

CodePudding user response:

try:

=IF(OR(AND(F21>"01/05/2022"; F21<"31/05/2022"); G21=2); $J$4; 
 IF(OR(AND(F21>"01/06/2022"; F21<"30/06/2022"); G21=3); $K$4; "errore"))

or for array:

=INDEX(IF((MONTH(F21:F)=5) (G21:G=2); J4;
       IF((MONTH(F21:F)=6) (G21:G=2); K4; "errore")))
  • Related