View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
vezerid vezerid is offline
external usenet poster
 
Posts: 751
Default Lookup value,return column heading

Given your data layout this is a formula to use in C14 and copy down:

=INDEX($B$1:$E$1,MATCH(B14,INDEX($B$2:$E$11,MATCH( A14,$A$2:$A$11,0),0),
0))

HTH
Kostis

On Nov 13, 8:00*pm, MFM wrote:

Thank you.
I actually have to first look up by date then apply the formula to an aray
to locate the column reference and copy doen. *Please see my example below.

Thank for your help. *This is killing me.

IN C14
=VLOOKUP(a14,$a$2:$c$11,MATCH($b$14,$B$2:$e$14,0), FALSE)

* * * * A * * * B * * * C * * * D * * * E
* * * * SCHEDULE * * * * * * * * * * * * * * * *
1 * * * DATE * *SALES * MKTG * *GEN * * PROD
2 * * * 01/01/07 * * * * * * * *dh * * *PL * * *ST
3 * * * 01/02/07 * * * *MS * * *HG * * *DM * * *RO
4 * * * 01/03/07 * * * * * * * *HG * * *TW * * *RO
5 * * * 01/04/07 * * * *MS * * *HR * * *HG * * *RO
6 * * * 01/05/07 * * * * * * * *DM * * *MG * * *HG
7 * * * 01/06/07 * * * * * * * * * * * *SU * * *MG
8 * * * 01/07/07 * * * * * * * *MG * * *SU * * *DH
9 * * * 01/08/07 * * * * * * * *DM * * *DR * * *RO
10 * * *01/09/07 * * * * * * * *HG * * *ES * * *RO
11 * * *01/10/07 * * * * * * * *ah * * *TW * * *GO
12 * * * * * * * * * * * * * * * * * * *
13 * * *DATE * *STAFF * DEPT Wk'd from Above * * * * * *
14 * * *01/01/07 * * * *PL * * *?? * * * * * * *
15 * * *01/06/07 * * * *MG * * *?? * * * * * * *
16 * * *01/09/07 * * * *ES * * *?? * * * * * * *
17 * * *01/06/07 * * * *SU * * *?? * * * * * * *
18 * * *01/10/07 * * * *TW * * *?? * * * * * * *
19 * * *01/03/07 * * * *RO * * *?? * * * * * * *
20 * * *01/01/07 * * * *DH * * *?? * * * * * * *
21 * * *01/06/07 * * * *SU * * *?? * * * * * * *
22 * * *01/09/07 * * * *RO * * *?? * * * * * * *


Alan Moseley IT Consultancy
http://www.amitc.co.uk



If I have solved your problem, please click Yes below. *Thanks.



"MFM" wrote:



I am trying to locate a matching value and return its columnheading. *
Ex A5=vlaue to find in row5 to return column heading a4:z4



hlookup(a5,b5:z5,(return matching column heading a4:z4),0)