If statements

M

Mark

Not exactly sure how to pose this question, but what I'm trying to do is use
different if statements based on a value. eg. if students in class "a" then
use if formula "1", if not use if formula 2.... Where each formual is a
series of 5 or 6 if statements . 90 and above, A;80 and above B; etc...
 
C

crispbd

If the grades are in column A, this function gives Letter Grade
according to:
= 90, A
= 80 (less than 90), B
=70, C
= 50, D
< 50, F


=IF(A1>=90,"A",IF(A1>80,"B",IF(A1>70,"C",IF(A1>=50,"D","F")))
 
M

mzehr

Hi Mark,
Another way:
=VLOOKUP(A1,{0,"F";50,"D";70,"C";80,"B";90,"A"},2)
Put that formula in B1 (assuming that your 1st grade is in A1) and copy down.

Another way:
create a table in say d1:e5
0 F
50 D
70 C
80 B
90 A

and use this formula:
=VLOOKUP(A1,$D$1:$E$5,2)
The advantage of using a lookup table is that you can easily change one
grade value, and your grades will all automatically recalculate.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top