exam marks into grades

J

Jacob Skaria

Will this help. With marks in A1
=IF(A1<40,"FAIL",LOOKUP(A1,{40,60,70,80},{"D","C","B","A"}))
 
A

Ashish Mathur

Hi,

Enter grade boundaries in range C5:D9 where C5:C9 holds 0,40.60,80,90 and
D5:D9 holds E,D,C,B,A. This table can be read as "if the marks are between
41 and 60, the grade will be D, if the marks are between 81 and 90, the
grade will be B" so on and so forth.

now enter the marks in C11 and in cell D11, enter =VLOOKUP(C11,$C$5:$D$9,2)

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com
 
T

Teethless mama

=IF(A1<40,"FAIL",LOOKUP(A1,{40,60,70,80},{"D","C","B","A"}))

Get rid off IF()

=LOOKUP(A1,{0,40,60,70,80},{"FAIL","D","C","B","A"})
 
H

Harlan Grove

Teethless mama said:
Get rid off IF()

=LOOKUP(A1,{0,40,60,70,80},{"FAIL","D","C","B","A"})
....

Good intention, but fails on garbage and blank cells. Garbage (<0,
100, TRUE/FALSE, text) may but produce correct results. Blank
produces FAIL. Probably closer to the OP's intent to use

=IF(COUNT(A1),LOOKUP(A1,{-9.99999999999999E
+306,0,40,60,70,80,100.000000000001},
{"Invalid","F","D","C","B","A","Invalid"}),"")
 

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