Tuesday 8 February 2011

Assigning Student Grades Using Excel

Here is the formula from MS office website:

=IF(A2>89,"A",IF(A2>79,"B", IF(A2>69,"C",IF(A2>59,"D","F"))))

If more than 6 conditions to check, better to use LOOKUP then IF/THEN

=LOOKUP(A2,{0,60,63,67,70,73,77,80,83,87,90,93,97},{"F","D-","D","D+","C-","C","C+","B-","B","B+","A-","A","A+"})


source: http://office.microsoft.com/en-us/excel-help/if-HP005209118.aspx