简体   繁体   English

根据单元格中的值从列表中选择值

[英]Select value from list based on value in cell

I am trying to select a value from a range of values, based on the number entered in a certain cell.我试图根据在某个单元格中输入的数字从一系列值中选择一个值。 Assume I have the following data available:假设我有以下可用数据:

1   308.331
2   292.363
3   289.582
4   294.610
5   300.468
6   298.427
7   292.433
8   293.646
9   282.613
10  293.143

(Note that this data is inside the same excel-sheet.) (请注意,此数据位于同一个 Excel 表中。)

If I enter number 10 into cell A1, how can I get to display the value for number 10 293.143 displayed into A2?如果我在单元格 A1 中输入数字10 ,我怎样才能显示显示在 A2 中的数字 10 293.143的值?

I have been looking at complex if statements but that doesn't seem like the correct way to go.我一直在研究复杂的 if 语句,但这似乎不是正确的方法。 Is there something of a select from function available in excel? excel中是否有可供select from功能?

You need to use VLOOKUP() ... https://support.office.com/en-ca/article/VLOOKUP-function-0bbc8083-26fe-4963-8ab8-93a18ad188a1您需要使用VLOOKUP() ... https://support.office.com/en-ca/article/VLOOKUP-function-0bbc8083-26fe-4963-8ab8-93a18ad188a1

Assuming the following layout ...假设以下布局......

在此处输入图片说明

Put this into cell E1 ...将其放入单元格 E1 ...

=VLOOKUP(D1, $A$1:$B$10, 2, FALSE)

Note the use of the 4th parameter FALSE ... that looks for an exact match.请注意使用第四个参数FALSE ... 寻找精确匹配。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM