简体   繁体   中英

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.)

If I enter number 10 into cell A1, how can I get to display the value for number 10 293.143 displayed into A2?

I have been looking at complex if statements but that doesn't seem like the correct way to go. Is there something of a select from function available in excel?

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

Assuming the following layout ...

在此处输入图片说明

Put this into cell E1 ...

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

Note the use of the 4th parameter FALSE ... that looks for an exact match.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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