I am writing a Google Sheet that checks a student's year level, then assigns a letter grade based on their mark in an assessment. If there is no mark, it is designed to leave the cell blank.
The following formula is successful, if a bit clunky. Is there a more elegant solution to this problem?
=IF(COUNTBLANK(AA12)>=1,"",IFS(P12=5,(IF(AA12>32,"A", (IF(AA12>28,"B",(IF(AA12>19, "C", (IF(AA12>16, "D", "E")))))))),P12=6,(IF(AA12>37,"A", (IF(AA12>32,"B",(IF(AA12>24, "C", (IF(AA12>19, "D", "E")))))))),P12=4,(IF(AA12>28,"A", (IF(AA12>24,"B",(IF(AA12>16, "C", (IF(AA12>12, "D", "E")))))))),P12=3,(IF(AA12>23,"A", (IF(AA12>19,"B",(IF(AA12>12, "C", (IF(AA12>8, "D", "E"))))))))))
The students grade is stored in Column 'P', and their mark in Column "AA"
Any suggestions are welcome.