Find Column

A

Airfive

Hello all,

Try as I might, I just can't seem to get my quandry solved and I need some
help. I have a worksheet with data located in the range of A9:M49. I am
trying to search through this range of data looking for a particular value.
When the value is found, I want to return the column header that the value is
in. I have been trying to use the index/match functions but I can't get
quite what I need. Could someone possibly give me some pointers. Thanks.

Ron
 
P

Peo Sjoblom

Where is the column headers located, in Row 8 or 9? or did you mean the
Excel column headers?
 
A

Airfive

Hi Peo,

The column headers are located in row 8 and they consist of a 4 digit
number. Every number is unique......no duplicates, the data range is also
unique with no duplicates. I have row 8 formatted as text but I have tried
changing the format to general. Still no luck. I found a post from Dave
Peterson regarding an almost exact situation but I could not get his solution
to work for me. His earlier post is as follows:

With the data to match in A2 and your 60 columns in b:bi

=index($b$1:$bi$1,match(a2,$b2:$bi2,0))


I have a spreadsheet with 60 columns of data, each with a unique header
label. What formula do I use to search each row for specific data, then,
upon finding a match, return the header label data (i.e. the info in Row 1 of
that particular column.)

Thanks!

--

Dave Peterson

Thanks for any help.

Ron
 
P

Peo Sjoblom

Try this

=INDEX($A$8:$M$8,MAX(($A$9:$M$49=A1)*(COLUMN($A$9:$M$49))))

entered with ctrl + shift & enter


where A1 holds the value you would like to find in A9:M49
 
Top