简体   繁体   English

v查找多组合值

[英]vlook up for multi combination value

Friend. 朋友

I have sheet1 like below 我有如下工作表

Jan Feb Mar Apr

A 10 15 13 10 一个10 15 13 10

B 11 11 15 12 B 11 11 15 12

C 12 13 15 14 C 12 13 15 14

D 12 10 10 15 D 12 10 10 15

In Sheet 2! 在工作表2中! i have 2 scroll scroll down list in cells made by data validation.fist one is in A1 with the values A, B and C, in A2 cell with the values Jan,Feb,Mar. 我在通过数据验证的单元格中有2个向下滚动列表。第一个在A1中,值为A,B和C,在A2单元中为Jan,Feb,Mar。

What i need on this, if i select A and Jan from scroll down list. 我需要什么,如果我从下拉列表中选择A和Jan。 i need to show the value as '10' in A3 Cell 我需要在A3单元格中将值显示为“ 10”

I tried VLook up with my limited knowlege but i can provide only one value in Lookup value and array. 我用有限的知识尝试了VLook,但是我只能在Lookup值和数组中提供一个值。

Please help. 请帮忙。

You have to provide vlookup a number of column to return as variable, which you may get as a return value of match function. 您必须提供vlookup多个列作为变量返回,您可以将它们作为match函数的返回值获得。

Sheet1 has populated range A1:E5 , where first row contains names of months (range A1:E1 ). Sheet1的填充范围为A1:E5 ,其中第一行包含月份名称(范围A1:E1 )。 Sheet2 has only values in two cells A1 and A2 . Sheet2仅在两个单元格A1A2中具有值。

You need to find in which column of Sheet1 is a month, that is done by 您需要找到Sheet1的哪个列是一个月,这是通过

match(a2, Sheet1!A1:E1, 0)+1

and find the value with VLOOKUP . 并使用VLOOKUP查找值。 The final formula would be 最终的公式是

=vlookup(a1, sheet1!a1:e10, match(a2, sheet1!A1:e1, 0)+1, false)

EDIT: The first time I messed Sheet1 and Sheet2. 编辑:第一次我搞砸了Sheet1和Sheet2。

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

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