Pulling a Letter Grade From an Excel Table Array

2020-05-02 10:15发布

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.

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.

This is an example of the raw data

Output

标签: excel
1条回答
Juvenile、少年°
2楼-- · 2020-05-02 10:46

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

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.

查看更多
登录 后发表回答