[英]Excel Vlookup - multiple lookup values?
is it possible to use something like this in vlookup() ? 是否可以在vlookup()中使用类似的内容?
=vlookup(or(1,2,3,4), a1:c10, 2)
I want to find the first instance in column A that contains the numbers 1-4 我想在A列中找到第一个包含数字1-4的实例
You can't use VLOOKUP
for this, but you can do it with the help of MATCH
. 您VLOOKUP
为此使用VLOOKUP
,但是可以在MATCH
的帮助下进行操作。
Try this (using array formula -> ctrl+shift+enter): 试试这个(使用数组公式-> ctrl + shift + enter):
{=INDEX(B1:B10,MIN(IFERROR(MATCH({1;2;3;4},A1:A10,0), FALSE)))}
The idea is to match against 1-4 to get the index, convert errors to non-errors ( FALSE
), then get the minimum row number. 想法是将1-4匹配以获取索引,将错误转换为非错误( FALSE
),然后获取最小行号。 Then that row number is used as an index to the values column. 然后,该行号将用作值列的索引。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.