Formulas: If function - largest number of If's in the f

  • I cannot seem to find any reference to the maximum number of If's that can be used in the If function. The following Excel example shows what I mean by this: There are 4 If functions "rolled/nested" into one: =IF(A2>89,"A",IF(A2>79,"B", IF(A2>69,"C",IF(A2>59,"D","F"))))


    I used to think the maximum number to be 7. Is this correct?


    If it is not, how far can I go?


    If it is, how may I stretch it to 21?


    Regards


    Harry

  • You're right thinking it's 7 nested levels Harry.


    A UDF using a Select Case statement can be used for more levels if you like, or if you explaing your issue better, perhaps VLOOKUP or MATCH might be better...


    Will

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!