You might try this conditional format formula:
This assumes that grades starting with 5 are better than grades starting with a 4. It first checks to see if the leftmost digit in cell B1 is greater than the leftmost digit in A1. If so, the OR condition is met and the cell will be colored. If that part isn't true it then checks to see if both leftmost digits are equal and the rightmost digit in B1 is less than the rightmost digit of A1. (Since a is less than b is less than c.) If the second part is true, B1 will be colored, if not, it will stay colorless. You could obviously set other conditions to color the cell another color if it's less than, or equal to, A1, using a similar formatted formula.
PS - If 4 is actually a better grade than 5, simply change "=OR(LEFT(B1,1)>LEFT(A1,1)..." to "=OR(LEFT(B1,1)<LEFT(A1,1)..."
Bookmarks