SOLVED

HOW TO: "If cell contains a specific value, display name of the column in which value is present"?

Copper Contributor

Hi all, 

 

I am trying to write a code that finds a value in a row and displays the name of the column in which the value is present.

 

for example: the output should display the column name where "Y" is present in the selected row.

Let's consider the second row, the output should be LPH.art (i.e. column where Y is present)

 

LPH LPH.TLPH + SDLPH.artOROR.artOutput
NNNYNNLPH.art
NYNNNNLPH.T

 

Thank you for the help!

Best, 

 

2 Replies
best response confirmed by lucadefre (Copper Contributor)
Solution

@lucadefre 

One option:

=INDEX(A$1:F$1,MATCH("Y",$A$2:$F$2,0))
1 best response

Accepted Solutions
best response confirmed by lucadefre (Copper Contributor)