I am trying to pull numerical grade values and convert them into a string which will represent the grade, A >90, B >80, and so on. I planned to use a for loop to gather the values from the spreadsheet and then if then statements to assign the letter designation. Here is the code I have so far.
For i = 1 To 11
' Pull Grade numerical value
Grade = Cells(2 + i, 16).Value
' Assign Numerical Value a script Grade
If Grade > 60 Then
Letter = "D"
If Grade > 70 Then
Letter = "C"
If Grade > 80 Then
Letter = "B"
If Grade > 90 Then
Letter = "A"
Else
Letter = "F"
Exit
' Print the letter grade
Cells(2 + i, 17).Text = Letter
Next i
I keep getting errors either pertaining to "Exit" or to "Next i". I have tried using "End" statements as well but that didn't fix the problems either.


IFblock withEND IFElse Ifs.