Excel索引匹配3个标准,但两列可以移动 [英] Excel Index Match with 3 criteria but two columns could move
问题描述
我有一个大的数据表,但是使用下表简单了解如何根据站点和描述获得钱?但是这是一个窍门。表格被复制并粘贴在表格中,有时候描述,目标和金钱被翻转。
I have a large table of data but to make it simple using the following table how would I get "money" based on site and description? But here's the trick..the table is copied and pasted in the sheet and sometimes description,target and money are flipped around.
那么我如何使用 INDEX
MATCH
根据标题?网站通常在 A:A
中是静态的,但如果有一种方法可以使该动态变得惊人!
So how would I select a column using INDEX
MATCH
based on the header? Site is normally static in A:A
but if there is a way to make that dynamic that would be amazing!!
推荐答案
您可以使用 INDEX
MATCH
将一列从表中返回到另一个 INDEX
MATCH
You can use INDEX
MATCH
to return a column out of a table to pass into another INDEX
MATCH
对于您的样本数据尝试
=INDEX(INDEX($A:$Z,,MATCH(B14,$1:$1,0)),MATCH(C12,INDEX($A:$Z,,MATCH(B12,1:1,0)),0))
确保内部 INDEX
范围足够大,可以覆盖你的桌子(我在这个例子中使用了 $ A:$ Z
)
Ensure the inner INDEX
range is large enough to cover your table wherever it is (I've used $A:$Z
in this example)
打破它, INDEX($ A:$ Z ,, MATCH(B12,1:1,0))
返回包含头值的列在这种情况下,单元格 B12
(站点
)。
Breaking it down, INDEX($A:$Z,,MATCH(B12,1:1,0))
returns the column containing the header value in cell B12
(Site
in this case).
同样对于 INDEX($ A:$ Z ,, MATCH(B13,$ 1:$ 1,0))
和钱
只需确定 B12中的标签
, B13
完全匹配表头(即站点
,而不是站点:
)
Just make sure the labels in B12
, B13
match the table headers exactly (ie Site
, not site:
)
根据评论,匹配网站
和描述
,尝试
Based on comment, to match site
and description
, try
=INDEX(INDEX($A:$Z,,MATCH(B14,1:1,0)),MATCH(1,(INDEX($A:$Z,,MATCH(B13,1:1,0))=C13)*(INDEX($A:$Z,,MATCH(B12,1:1,0))=C12),0))
按数组公式输入(按Ctrl-Shift-Enter,而不是输入)
entered as an array formula (press Ctrl-Shift-Enter rather than just Enter)
这篇关于Excel索引匹配3个标准,但两列可以移动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!