I've used a named range to do my caparisons. it removes the need for alot of vlookups
Named range = GRADES
={"AS","A","B","C","D","E","F","G","N","U"}
Then i can use conditional formatting using a formula ie
=MATCH(A2,GRADES,FALSE)=MATCH(B2,GRADES,FALSE)
.
altering the = for < or> depending on the rule.

countifs can then be done using the same principals