Forum Discussion

jeffjm's avatar
jeffjm
Copper Contributor
Jun 26, 2024

IF and ANDfunction

Trying to setup divisions for 3 sets of handicaps using '=IF(C2<=12,$G$2,IF(C2>=13<20,$G$3,IF(C2>20,$G$4)))' but only getting 1st and last formula to calculate and getting a 'false' message for the middle formula-how do I set up this function within the calculation?

  • djclements's avatar
    djclements
    Bronze Contributor

    jeffjm The correct syntax and logic would be:

     

    =IF(C2<=12, $G$2, IF(AND(C2>12, C2<=20), $G$3, IF(C2>20, $G$4)))

     

    However, with only 3 levels this is overkill and can be simplified as follows:

     

    =IF(C2<=12, $G$2, IF(C2>20, $G$4, $G$3))

     

Resources