Set up a table like this (say in cells A1 to B5) - substitute your own numbers for the grades (maximum number for each grade and should be sorted worst to best).
Code:
30 F
50 D
60 C
70 B
90 A
Say your score is in column A from row # 8 down.
Then to get a grade use the following forumula
"=index($b$1:$b$5,match(a8,$a1:$a5,1))"
Works much better than nested IF statements, especially when your table has hundreds or thousands of entries