Reputation: 107
I have two sheets sheet1 and sheet2.There is a text in sheet1 'customer'.I want to find the column name like A from sheet2 if text 'customer' found in a cell of row 1 of sheet2.I am using Match function but it is returning only the index.Is there a way to find the column name like A?
Upvotes: 1
Views: 3410
Reputation: 3034
Took me a while of playing around but this will work for EXACT matches.
As the example data states Client
and not Clients
it returns an error and therefore is forced to state "Not Found"
. In cell B2 of sheet 1, copied down is the formula:
=IFERROR(SUBSTITUTE(ADDRESS(1,MATCH(A2,Sheet2!$A$1:$D$1,0),4),"1",""),"Not Found")
Upvotes: 1