it will also assign a B...
you need an IF / ELSEIF / ENDIF
or another qualifier on the "B" part... for instance, Average > 79 AND Average < 90...
or... just reverse the order... start with "if Av > 60 then grade = 'D'" and work your way up to "if Av > 89 then grade = 'A'"
you follow?