I am making an Excel sheet to keep up with my college grades. I have one columns that displays my hours, one that displays my grade (A, B, C, D, or F), and one column that displays my quality points (hours x 4 for A, 3 for B, 2, for C, 1 for D, 0 for F).
What formula can I use to get my quality points to display by just entering in my letter grade? I thought about an IF but was unsure that it would work for what I want. I have an example of what I am talking about below.
Hours Grade Q. Points
3 A 12
1 B 3
2 C 4
3 B 9
You see, an A is worth 4 points, a B is worth 3, a C is worth 2, a D is worth 1, and an F is worth 0. You multiply the hours by the points to get your quality points.
What kind of formula can I use so that when I put a letter grade in a cell, my quality points are automatically calculated.
If programming it would look something like this:
Where F9 is hours, G9 is letter grade , and H9 is quality points.
If G9 = A then H9 = F9 x 4
else
G9 = B then H9 = F9 x 3
else
G9 = C then H9 = F9 x 2
else
G9 = D then H9 = F9 x 1
else
G9 = F then H9 = F9 x 0
end
Last edited by eddie barzoon; 06-20-2008 at 03:11 PM.
Assuming that A2:A5 contains hour, and B2:B5 contains the grade, try...
C2, copied down:
=A2*VLOOKUP(B2,{"A",4;"B",3;"C",2;"D",1;"F",0},2,0)
Hope this helps!
Originally Posted by Domenic
That works great but if nothing is in the cells that it references then I get a #NA. Is there anyway to modify it so that it is blank or a 0 or something shows up?
Thanks again for that function.![]()
Try...
=IF(B2<>"",A2*VLOOKUP(B2,{"A",4;"B",3;"C",2;"D",1;"F",0},2,0),"")
Hope this helps!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks