从Excel表数组中提取字母等级 [英] Pulling a Letter Grade From an Excel Table Array

查看:38
本文介绍了从Excel表数组中提取字母等级的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有一种简单的方法可以将字母等级从数组中拉出,而不是我现在使用的一堆嵌套If语句的方式.

I am wondering if there is an easier way to pull a letter grade out of an array then the current way i use with a bunch of Nested If statements.

我的想法是,如果GPA(G1-G5)在B1:C12之间,则返回A1-A12.图1显示原始数据,图2显示所需的输出.

My idea is If GPA (G1-G5) is in between B1:C12 Then return A1-A12. Picture 1 shows Raw Data, Picture 2 is the Desired Output.

这是原始数据的示例

输出

推荐答案

您不需要较高"列,只需将较低值"列和字母等级列用作前两列即可.按升序对它们进行排序,以便它们位于A1:B12中.

You don't need the "higher" column, just use the "lower value" column and the letter grade column as your first two columns. Sort them in ascending order so they're in A1:B12.

0.00, F
0.34, D-
0.68, D
1.01, D+
1.34, C-
1.68, C
2.01, C+
2.34, B-
2.68, B
3.01, B+
3.34, A-
3.68, A

现在,如果您的成绩位于(例如)D3单元格中,则可以使用...将字母成绩输入到E3单元格中

Now if your grade is in (for example) cell D3, you can get the letter grade into cell E3 with...

=VLOOKUP(D3,A1:B12,2,TRUE)

这将返回大于或等于第一列值的第一个数字的第二列值.

This will return the second column value for the first number greater than or equal to the first column value.

这篇关于从Excel表数组中提取字母等级的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆