Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to return a Column Header
I have several columns with rows of data in them. For example
_____Header1_____Header2_____Header3_____ _____Data1_______Data2_______Data3_______ What I want to do is search for "Data2" text, and return that Column's header, for instance, in this example, searching for "Data2" would yield "Header2". What formula should best be used? Thanks. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
How to return a Column Header
I have several columns with rows of data in them.
Headers in the range A1:C1 Data in the range A2:C6 E1 = lookup value Try this array formula** : =INDEX(A1:C1,MAX(IF(A2:C6=E1,COLUMN(A1:C1)))-COLUMN(A1)+1) ** array formulas need to be entered using the key combination of CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT key then hit ENTER. -- Biff Microsoft Excel MVP "Scott" wrote in message ... I have several columns with rows of data in them. For example _____Header1_____Header2_____Header3_____ _____Data1_______Data2_______Data3_______ What I want to do is search for "Data2" text, and return that Column's header, for instance, in this example, searching for "Data2" would yield "Header2". What formula should best be used? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Return column header within an array when a value is met | Excel Worksheet Functions | |||
Return header cell of last column with data | Excel Discussion (Misc queries) | |||
Return column number from column header text | Excel Discussion (Misc queries) | |||
Rank and return column header | Excel Discussion (Misc queries) | |||
Return Column header, if row value is > X | Excel Discussion (Misc queries) |