根据搜索条件查找列名 [英] Find column name based on search criteria
本文介绍了根据搜索条件查找列名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有以下Excel电子表格:
I have the following Excel spreadsheet:
A B C D E F
1 MFC2 MFC1 QFC Search Criteria: CW14
2 CW11 Column Name: MFC1
3 CW13
4 CW14
5 CW17
6 CW18
7 CW19
8
9
在Cells A1:C8
中,我有不同的日历周.他们都是唯一!
在Cell E2
中,我希望根据Cell E1
中的值显示column name
.
在这种情况下,搜索条件为CW14
,因此结果应为列名MFC1
.
In Cells A1:C8
I have different calender weeks. All of them are unique!
In Cell E2
I want that the column name
is displayed based on the value that is put in Cell E1
.
In this case the search criteria is CW14
so the result should be column name MFC1
.
我尝试通过此修改公式问题,但无法正常工作:
I tried to modify the formula from this question but could not make it work:
E1 = INDEX($A$1:$C$1,MATCH(E$1,$A$2:$C$30,0))
此公式给了我#NV
结果.
我需要做些什么才能得到想要的结果?
This formula gives me #NV
as result.
What do I need to change to get the desried result?
推荐答案
使用AGGREGATE代替MATCH:
Use AGGREGATE instead of MATCH:
=INDEX(1:1,AGGREGATE(15,7,COLUMN($A$2:$C$30)/($A$2:$C$30=$E$1),1))
这篇关于根据搜索条件查找列名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文