Skip to main content
I am hoping to write a formula that evaluates two fields. Basically, I am attempting to calculate GPA for each individual class (the main issue) and then average the overall GPA.

 

GPA is based on the number grade and the class type. So, a regular weighted class with a grade in the range of 93-100 would receive a 4.0 GPA, for instance. For each class there are MANY options which leads to a formula that is ultimately too long with nested IF statements. It goes well over 5000 characters. There are 5 grade ranges and 6 different class types. I tried to reduce the formula by using another formula for each class that places it in a weighted category, i.e., regular classes are unweighted, honors are weighted .5, AP are weighted 1.0, etc. The problem then is that I'm pulling from a different formula field for this formula field which seems to add to the characters.

 

Does anyone have a better idea how to do this? In Excel I could create a reference table and do some vlookups. Is there anything similar to that that I could do? 
9 件の回答
  1. 2014年8月18日 20:26
    How about this[ I am not sure just something popped up in my mind ]:

     

    IF(

    English_Grade__c < 70,

    0,

    IF(

    English_Grade__c < 75,

    1,

    IF(

    English_Grade__c < 85,

    2,

    IF(

    English_Grade__c < 93,

    3,

    IF(

    English_Grade__c < 101,

    4,

    NULL

    )

    )

    )

    ) +

    CASE(

    English_Class_Type__c,

    'Regular', 0,

    'Honors', 0.5,

    'DE', 0.5,

    'AP', 1,

    'IB', 1,

    'CAICE', 1,

    NULL

    )

    )

0/9000