Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

excel - Find column name based on search criteria

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

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))

This formula gives me #NV as result.
What do I need to change to get the desried result?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
=INDEX($A$1:$C$1,MAX(ISNUMBER(FIND(E1,$A$2:$C$7))*COLUMN($A$2:$C$7)))

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...