16 views

### rcol...@my-dejanews.com

Sep 17, 1998, 3:00:00 AM9/17/98
to
Hi, all. Will someone help me build a grade calculation formula for Excel97?

Previously I successfully used the following formula to convert percentages
into Alpha values of "A", "B", "C", "D", or "F":

Now, I'm having problems because I need to break grades down to "A+", "A",
"A-", "B+", "B", "B-", etc. whereby:

97 - 100 = A+
93 - 96 = A
90 - 92 = A-
87 - 89 = B+
83 - 86 = B
89 - 82 = B-
77 - 79 = C+
73 - 76 = C
70 - 72 = C-
67 - 69 = D+
63 - 66 = D
60 - 62 = D-
0 - 59 = F

The problem I run into is that I can't seem to nest more than seven IF
statements. Can someone who is much sharper than me offer some suggestions?

Thank you so much,

Bob Cole
rc...@oswego.edu

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum

### Morten Hvistendahl

Sep 18, 1998, 3:00:00 AM9/18/98
to rcol...@my-dejanews.com

This is one way to solve your problem. Enter the following User Defined VBA function into your Visual Basic Editor (Tools -->Macro -->Visual Basic Editor -->Insert -->Module). This function will be available under "User Defined" functions.

Step1 = 59  'F
Step2 = 62  'D-
Step3 = 66  'D
Step4 = 69  'D+
Step5 = 72  'C-
Step6 = 76  'C
Step7 = 79  'C+
Step8 = 82  'B-
Step9 = 86  'B
Step10 = 89 'B+
Step11 = 92 'A-
Step12 = 96 'A

ConvAlpha = "F"
ConvAlpha = "D-"
ConvAlpha = "D"
ConvAlpha = "D+"
ConvAlpha = "C-"
ConvAlpha = "C"
ConvAlpha = "C+"
ConvAlpha = "B-"
ConvAlpha = "B"
ConvAlpha = "B+"
ConvAlpha = "A-"
ConvAlpha = "A"
Else
ConvAlpha = "A+"
End If
End Function

### R.V. Mendoza

Sep 18, 1998, 3:00:00 AM9/18/98
to
Click on Tools->Macro->Visual Basic Editor.
In Visual Basic Editor, click on Insert->Module.
Copy and paste the following function into the module:

Select Case score
Case 97 To 100
Case 93 To 96
Case 90 To 92
Case 87 To 89
Case 83 To 86
Case 80 To 82
Case 77 To 79
Case 73 To 76
Case 70 To 72
Case 67 To 69
Case 63 To 66
Case 60 To 62
Case 0 To 59
Case Else
End Select
End Function

Close Visual Basic Editor. Examples on using the function