Conversion from a letter grade to a number grade

Espiritu108

New Member
Joined
May 19, 2003
Messages
4
What I am trying to do is simply enter a letter grade in one column per student, then have Excel convert that letter grade into a number grade in another column.

What function must be used and how?

Espiritu
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
If A1 contains uppercase A, then:

=CODE(A1)

returns 65 which is the ANSI value (B is 66 etc). To assign the value 1 to Grade A, you could use:

=CODE(A1)-64
 
Upvote 0
Thank you! This has given me food for thought and a push in the right direction.

I'm working on figuring out how to assign the value 4 to A, 3 to B, etc.

Joe
 
Upvote 0
Here's an alternative of mine, but it's from number to letter:


Function MARK(a)

If a >= 70 Then
MARK = "A"
End If

If a >= 60 And a <= 69 Then
MARK = "B"
End If

If a >= 50 And a <= 59 Then
MARK = "C"
End If

If a >= 40 And a <= 49 Then
MARK = "D"
End If

If a >= 35 And a <= 39 Then
MARK = "E"
End If

If a >= 30 And a <= 34 Then
MARK = "F"
End If

If a < 30 Then
MARK = "G"
End If

If a = 0 Then
MARK = "N/A"
End If
End Function


My marking scale may differ from yours, of course!!

Atholl
 
Upvote 0
Atholl,

I've never entered anything like that in Excel. I would have to guess that you wrote VBA. Am I correct? If so, then it seems that's a good way to go. The reason being that I was just informed that the grading scale is from 60-100, and not the A=4, B=3, C=2, etc. grading scale. More like 91-100=A, 81-90=B, etc.

I am actually researching the answer for another who has asked me for help.

Thanks Atholl!
----------------------
Aladin,

Excellent! Looks like I'll have to inform the man of this option. Thanks!


Espiritu
 
Upvote 0
Espiritu,

In the code, 'a' is your cell of interest. Enter =MARK(A1) in a cell in your worksheet (this assigns 'a' in the VBA code as cell A1 in the spreadsheet).
Now, when you enter a number (from 0 - 100) in cell A1, the corresponding mark will appear in the cell where you entered =MARK(A1)
All you have to do is play about with the code to make it suit your grading scheme.


Hope that makes it clearer :)

Atholl
 
Upvote 0

Forum statistics

Threads
1,214,386
Messages
6,119,212
Members
448,874
Latest member
b1step2far

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