简体   繁体   English

如何在Excel上匹配或查找值?

[英]How can I match or lookup a value on Excel?

I got these 2 questions in an exam, and as easy as they sound, I couldn't get them right. 我在考试中得到了这两个问题,听起来很简单,我无法理解它们。

So I have this table. 所以我有这张桌子。

在此输入图像描述

And the questions are: 问题是:

1- Using a function, What is the price of the first Diesel car that appears on the list? 1-使用功能,列表中出现的第一辆柴油车的价格是多少?

2- Using a function, What is the brand of the second model of the list? 2-使用功能,列表的第二个型号的品牌是什么?

If anyone can help me I'd be very grateful. 如果有人能帮助我,我会非常感激。 Thanks. 谢谢。

The MATCH function is useful here https://support.office.com/en-gb/article/MATCH-function-0600e189-9f3c-4e4f-98c1-943a0eb427ca MATCH函数在这里很有用https://support.office.com/en-gb/article/MATCH-function-0600e189-9f3c-4e4f-98c1-943a0eb427ca

and offset https://support.office.com/en-za/article/OFFSET-function-b3958b36-c30b-4fc3-979e-9b9bbfdcf592 和抵消https://support.office.com/en-za/article/OFFSET-function-b3958b36-c30b-4fc3-979e-9b9bbfdcf592

Try something like 尝试类似的东西

=MATCH("Diesel", E:E, 0) // CTRL + SHIFT + ENTER // returns 4

Wrap it in an offset 将其包裹在偏移中

=OFFSET(E1, MATCH("Diesel", E:E, 0), 1, 1, 1) // returns value at F4

Num. 民。 1 is simple. 1很简单。 =Vlookup("Diesel",E1:F22,2,False)

Num. 民。 2 is more difficult. 2更难。 =Index(A1:F22,Small(If(E1:E22,"Diesel",Row(E1:E22),""),2)-Row(E1:E22)+1,2)

Note: The formula for #2 is an array and must be entered with SHIFT + CTRL + ENTER, or else it will return #NUM. 注意:#2的公式是一个数组,必须使用SHIFT + CTRL + ENTER输入,否则它将返回#NUM。

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

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