vlookup字母加数字_使用VLOOKUP将百分比转换为字母等级

vlookup字母加数字

Usually when I use VLOOKUP, I want to pull information for an exact match. For example, if I enter a customer number in one cell, I want the customer name in the adjacent cell. I don't want the name of a customer whose number is CLOSE to the one that I entered.

通常,当我使用VLOOKUP时,我希望提取信息以进行完全匹配。 例如,如果我在一个单元格中输入客户编号,则需要在相邻单元格中输入客户名称。 我不希望客户的姓名与我输入的姓名接近的客户的姓名。

In some situations though, an approximate match is preferred, so several values will return the same result. For example, when working with student grades, I don't want to create a lookup table where I have to enter every possible percentage.

但是在某些情况下,首选近似匹配,因此多个值将返回相同的结果。 例如,在处理学生成绩时,我不想创建一个查找表,我必须在其中输入每个可能的百分比。

Instead, my lookup table should have the starting percentage for each grade. Based on the table below, all percentages of 85 or over should receive an A grade.

相反,我的查询表应具有每个年级的起始百分比。 根据下表,所有85%或以上的百分比都应获得A级。

GradesTable01

查询表 (The Lookup Table)

In this example, the lookup table is created on a sheet named Grades. To create the lookup table:

在此示例中,查找表在名为Grades的工作表上创建。 要创建查找表:

  1. In the first column, enter the minimum percentage for each grade.

    在第一列中,输入每个年级的最低百分比。
  2. In the second column, enter the matching Grade for each percentage.

    在第二列中,为每个百分比输入匹配的成绩。
  3. Sort the percentages in Ascending order. If not sorted A-Z, the results of the VLOOKUP formula might be wrong.

    按升序对百分比排序。 如果未排序AZ,则VLOOKUP公式的结果可能是错误的。

报告卡 (The Report Card)

The scores are entered on a sheet named Report Card, where a VLOOKUP formula calculates the grade.

分数将输入到名为Report Card的工作表中,其中VLOOKUP公式将计算成绩。

  1. On the Report Card sheet, in cell B4, enter the percentage -- 77.

    在“报告卡”页的B4单元格中,输入百分比-77。
  2. In cell C4, enter the VLOOKUP formula:

    在单元格C4中,输入VLOOKUP公式:

=VLOOKUP(B4,Grades!$B$4:$C$8,2,TRUE)

= VLOOKUP(B4,Grades!$ B $ 4:$ C $ 8,2,TRUE)

GradesTable02
  1. Press the Enter key, and the grade for English -- B -- is returned.

    按Enter键,并返回英语的成绩-B-。
  2. Copy the formula down to the remaining cells in the report card.

    将公式复制到报告卡中其余的单元格中。

这个怎么运作 (How It Works)

  1. In the VLOOKUP formula, the first argument, B4, is the value that we want to look up in the Grades table.

    在VLOOKUP公式中,第一个参数B4是我们要在“成绩”表中查找的值。

  2. The second argument, Grades!$B$4:$C$8, is the location of the lookup table. The reference is absolute $B$4:$C$8, instead of relative, so that the VLOOKUP formula can be copied to other cells, and the table reference won't change.

    第二个参数Grades!$ B $ 4:$ C $ 8是查找表的位置。 该引用是绝对的$ B $ 4:$ C $ 8,而不是相对的,因此VLOOKUP公式可以复制到其他单元格,并且表引用不会更改。

  3. The third argument, 2, is the column number in the lookup table, where the Grades are located. When a percentage match is found in the first column, a letter grade from the 2nd column will be returned.

    第三个参数2是成绩所在的查找表中的列号。 当在第一列中找到百分比匹配时,将返回第二列中的字母等级。
  4. The fourth argument, TRUE, means that an approximate match is okay. This is the default setting, and if you omit TRUE, you'll get the same result from the formula.

    第四个参数TRUE表示近似匹配是可以的。 这是默认设置,如果省略TRUE,则将从公式中获得相同的结果。

观看视频 (Watch the Video)

If you'd like to see the steps in action, you can watch the short video below.

如果您想查看操作步骤,可以观看下面的简短视频。

演示地址

翻译自: https://contexturesblog.com/archives/2009/06/01/convert-percentages-to-letter-grades-with-vlookup/

vlookup字母加数字

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值