Numeric values for letter grades.

Andy0311

Board Regular
Joined
Oct 16, 2019
Messages
118
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I need help on a formula to convert letter grades to numeric values. The grades are posted as:
A = 4
B = 3
C = 2
D = 1
F = 0
Once I get the range of numbers, I can easily average them. Thank you.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Perhaps this:

Excel Formula:
=LOOKUP(A2,{"A","B","C","D","F"},{4,3,2,1,0})

Edit: Whoops, forgot the "".
 
Upvote 0
This would also work...

=SEARCH(A1,"FDCBA")-1

and assuming upper case letters only, this would work too...

=MAX(0,69-CODE(A2))
 
Upvote 0
Perhaps this:

Excel Formula:
=LOOKUP(A2,{"A","B","C","D","F"},{4,3,2,1,0})

Edit: Whoops, forgot the "".
Hello, Thanks for your help. With your formula I am getting in certain cells an #NA instead of a number. Am I doing something wrong? Thanks again.
B3
A4
B3
B#N/A
A4
A4
B#N/A
A#N/A
B#N/A
 
Upvote 0
Check to make sure you do not have a space character in the cells along with the letters... your grade cells must only contain the single letter and nothing else.
 
Upvote 0
This would also work...

=SEARCH(A1,"FDCBA")-1

and assuming upper case letters only, this would work too...

=MAX(0,69-CODE(A2))
Hello, Rick, and thanks for your help. When I apply the MAX formula in certain cells I am getting number 37 returned. Any reason this might be occurring? Thanks again.
B3
A4
B3
B37
A4
A4
B37
A37
B37
C2
D1
A4
 
Upvote 0
Your cell has a leading space character. If your method of putting the grades in the cells automatically does this, then try these versions of my formulas...

=SEARCH(TRIM(A1),"FDCBA")-1

=MAX(0,69-CODE(TRIM(A2)))

and you should be able to change @dreid1011's to this to make it work...

=LOOKUP(TRIM(A2),{"A","B","C","D","F"},{4,3,2,1,0})
 
Upvote 0
Solution
Your cell has a leading space character. If your method of putting the grades in the cells automatically does this, then try these versions of my formulas...

=SEARCH(TRIM(A1),"FDCBA")-1

=MAX(0,69-CODE(TRIM(A2)))

and you should be able to change @dreid1011's to this to make it work...

=LOOKUP(TRIM(A2),{"A","B","C","D","F"},{4,3,2,1,0})
Worked perfectly! Thank you, sir!
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,151
Members
453,021
Latest member
Justyna P

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