If this percentage, then A, If this then B

HAWA

New Member
Joined
Jun 19, 2002
Messages
28
Hello, My wife is a Teacher, and made a spreadsheet to keep track of her student's grades. She wants to have a cell (actually a column) that will give her a letter grade for each percentage. I was able to make it work for only one condition/percentage with this formula =IF(B2>90%,"A"), but it needs to do more. Basically, it needs to give an A if more than 90 percent, a B if more than 80 less than 90, and so on. Can this be done all in one cell? I think the cell needs to have 5 or six letter grades with matching percentages.

Thanks in advance for your help.
Sam
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
On 2002-10-08 15:29, HAWA wrote:
Hello, My wife is a Teacher, and made a spreadsheet to keep track of her student's grades. She wants to have a cell (actually a column) that will give her a letter grade for each percentage. I was able to make it work for only one condition/percentage with this formula =IF(B2>90%,"A"), but it needs to do more. Basically, it needs to give an A if more than 90 percent, a B if more than 80 less than 90, and so on. Can this be done all in one cell? I think the cell needs to have 5 or six letter grades with matching percentages.

Thanks in advance for your help.
Sam


I just posted the following for another inquiry.


One solution is to just use a Lookup
edit one of the following

=LOOKUP(A3*100,{0,60,70,80,90;"F","D","C","B","A"}) or

=LOOKUP(A4,{0,0.6,0.7,0.8,0.9;"F","D","C","B","A"})

or
Function LetterGrade(NumberGrade As Double) As String
'ensure correct results are are thresholds
' may have to adjust ranges such as .9 to .929
Select Case NumberGrade
Case Is > 0.97: LetterGrade = "A+"
Case 0.93 To 0.97: LetterGrade = "A"
Case 0.9 To 0.93: LetterGrade = "A-"
Case 0.87 To 0.9: LetterGrade = "B+"
Case 0.83 To 0.87: LetterGrade = "B"
Case 0.8 To 0.83: LetterGrade = "B-"
Case 0.77 To 0.8: LetterGrade = "C+"
Case 0.73 To 0.77: LetterGrade = "C"
Case 0.7 To 0.73: LetterGrade = "C-"
Case 0.67 To 0.7: LetterGrade = "D+"
Case 0.63 To 0.67: LetterGrade = "D"
Case 0.6 To 0.63: LetterGrade = "D-"
Case Else: LetterGrade = "F"
End Select
End Function
This message was edited by Dave patton on 2002-10-08 15:47
 
Upvote 0
You guys are great! The =LOOKUP(A3*100,{0,60,70,80,90;"F","D","C","B","A"}) formula works the way I think she want it to work. I'll check with my wife this evening, and see if that's what she need it to do.

Thanks again for your help.
Sam
 
Upvote 0

Forum statistics

Threads
1,221,154
Messages
6,158,246
Members
451,478
Latest member
Nfitzy85

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top