将学生成绩转换成成绩并不容易? [英] Converting student scores to grades not that easy?
问题描述
我很感激帮助将学生平均考试成绩转换为成绩。我的b $ b问题是我需要分配大约20个等级中的一个(3a,3b,3c,4a,4b,4c
等到8c以及其他几个等级) )。
这个使用嵌套的IIf太复杂了,然后,否则。
我尝试了一个查找表但是我发现的问题是除非
平均测试成绩完全匹配,然后不返回成绩。例如,11.0的
得分返回到4b级,但得分11.1则不会。我试过
将数字字段(得分)格式化为固定数字,没有小数
,但这没有效果。
我想我希望查找表能够处理> 10.9 =" 4b"或类似的
但表格格式错误说我在文本字段中输入了文字。
任何建议都是最受欢迎的。
>
Terry
我认为如果你清楚地定义范围我们可以提供帮助。什么范围的
平均测试分数映射到4b的等级?如果你给我们两个
的连续范围,我想,它会非常清楚(也许......)。
< blockquote> Penfold:
您可以通过以下几种方式进行操作。第一种方法是使用
自定义函数和Select Case语句。第二种方法,使用一个
查找表将为每个
等级定义一个下限和上限,然后使用你的查找来找到介于两者之间的等级/>
边界。这样的事情:
tblGrade
等级(文字)
降低分数(数量,双倍)
UpperScore(数量,双倍)
4b
10.5
11.5
HTH,
Jana
也许
公共职能B级(ByVal AverageScore As货币)作为字符串
GradeB = Int((AverageScore - 2)/ 6)+ 3
GradeB = GradeB&字符
I''d appreciate help converting student average test scores into grades. My
problem is that I need to allocate one of about 20 grades (3a,3b,3c,4a,4b,4c
etc through to 8c plus a couple of others).
This comes up as too complex using nested IIf, then, else.
I tried a lookup table but here the problem I found was that unless the
average test score matches exactly then no grade is returned. For example a
score of 11.0 returns grade 4b but a score of 11.1 will not. I tried
formatting the number field (for score) to fixed number with no decimal
places but this had no effect.
I guess I would like the lookup table to to handle >10.9 = "4b" or similar
but the table format errors saying I entered text into a number field.
Any suggestions would be most welcome.
Terry
I think we could help if you define the range clearly. What range of
average test scores maps to a grade of 4b? If you were to give us two
consecutive ranges it would, I think, be quite clear (maybe ...).
Penfold:
You could go a couple of ways on this. First way would be to use a
custom function and a Select Case statement. Second way, using a
Lookup table would be to define a lower and upper boundary for each
grade, and then use your lookup to find the grade that falls between
the boundaries. Something like this:
tblGrade
Grade (text)
LowerScore (Number, Double)
UpperScore (Number, Double)
4b
10.5
11.5
HTH,
Jana
maybe
Public Function GradeB(ByVal AverageScore As Currency) As String
GradeB = Int((AverageScore - 2) / 6) + 3
GradeB = GradeB & Chr
这篇关于将学生成绩转换成成绩并不容易?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!