Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
EB EB is offline
external usenet poster
 
Posts: 6
Default Lookup Value and Return Column Heading

Need formula to lookup a value from a table and return the corresponding
column heading.
For example, I would like to look up the value 12 and have the formula
return 2222.
Example of table - Table is 6 columns x 9 rows. No row headers just column
headers.

A B
1111 2222
1 06 07
2 09 10
3 11 12

Appreciate the help
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Lookup Value and Return Column Heading

=INDEX(A1:B1,MAX(INDEX((A2:B4=12)*COLUMN(A2:B4),)) )


"eb" wrote:

Need formula to lookup a value from a table and return the corresponding
column heading.
For example, I would like to look up the value 12 and have the formula
return 2222.
Example of table - Table is 6 columns x 9 rows. No row headers just column
headers.

A B
1111 2222
1 06 07
2 09 10
3 11 12

Appreciate the help

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Lookup Value and Return Column Heading

Some of the values in the table data have leading 0s. Are these formatted
numbers or TEXT entries? Are there any duplicate values in the data table?

--
Biff
Microsoft Excel MVP


"eb" wrote in message
...
Need formula to lookup a value from a table and return the corresponding
column heading.
For example, I would like to look up the value 12 and have the formula
return 2222.
Example of table - Table is 6 columns x 9 rows. No row headers just column
headers.

A B
1111 2222
1 06 07
2 09 10
3 11 12

Appreciate the help



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
EB EB is offline
external usenet poster
 
Posts: 6
Default Lookup Value and Return Column Heading

Thanks for the responses
No duplicates and all are formatted as numbers.

The first formula post will not return the value 100% of the time. The
lookup value will change and may or not be the max/min number in the column.

Thanks

"T. Valko" wrote:

Some of the values in the table data have leading 0s. Are these formatted
numbers or TEXT entries? Are there any duplicate values in the data table?

--
Biff
Microsoft Excel MVP


"eb" wrote in message
...
Need formula to lookup a value from a table and return the corresponding
column heading.
For example, I would like to look up the value 12 and have the formula
return 2222.
Example of table - Table is 6 columns x 9 rows. No row headers just column
headers.

A B
1111 2222
1 06 07
2 09 10
3 11 12

Appreciate the help




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Lookup Value and Return Column Heading

The first formula post will not return the value 100% of the time.

What is the *exact* location of the table in cell references? Like: it's in
the range G10:L18.

--
Biff
Microsoft Excel MVP


"eb" wrote in message
...
Thanks for the responses
No duplicates and all are formatted as numbers.

The first formula post will not return the value 100% of the time. The
lookup value will change and may or not be the max/min number in the
column.

Thanks

"T. Valko" wrote:

Some of the values in the table data have leading 0s. Are these formatted
numbers or TEXT entries? Are there any duplicate values in the data
table?

--
Biff
Microsoft Excel MVP


"eb" wrote in message
...
Need formula to lookup a value from a table and return the
corresponding
column heading.
For example, I would like to look up the value 12 and have the formula
return 2222.
Example of table - Table is 6 columns x 9 rows. No row headers just
column
headers.

A B
1111 2222
1 06 07
2 09 10
3 11 12

Appreciate the help








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
EB EB is offline
external usenet poster
 
Posts: 6
Default Lookup Value and Return Column Heading

Table Range A85:F94 -- Column headings in row 85

Thanks

"T. Valko" wrote:

The first formula post will not return the value 100% of the time.


What is the *exact* location of the table in cell references? Like: it's in
the range G10:L18.

--
Biff
Microsoft Excel MVP


"eb" wrote in message
...
Thanks for the responses
No duplicates and all are formatted as numbers.

The first formula post will not return the value 100% of the time. The
lookup value will change and may or not be the max/min number in the
column.

Thanks

"T. Valko" wrote:

Some of the values in the table data have leading 0s. Are these formatted
numbers or TEXT entries? Are there any duplicate values in the data
table?

--
Biff
Microsoft Excel MVP


"eb" wrote in message
...
Need formula to lookup a value from a table and return the
corresponding
column heading.
For example, I would like to look up the value 12 and have the formula
return 2222.
Example of table - Table is 6 columns x 9 rows. No row headers just
column
headers.

A B
1111 2222
1 06 07
2 09 10
3 11 12

Appreciate the help






  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
EB EB is offline
external usenet poster
 
Posts: 6
Default Lookup Value and Return Column Heading

Thanks all -- Was able to return the column heading with sumproduct.
=sumproduct((A85:F85)*(A86:F94="my lookup value"))

"eb" wrote:

Table Range A85:F94 -- Column headings in row 85

Thanks

"T. Valko" wrote:

The first formula post will not return the value 100% of the time.


What is the *exact* location of the table in cell references? Like: it's in
the range G10:L18.

--
Biff
Microsoft Excel MVP


"eb" wrote in message
...
Thanks for the responses
No duplicates and all are formatted as numbers.

The first formula post will not return the value 100% of the time. The
lookup value will change and may or not be the max/min number in the
column.

Thanks

"T. Valko" wrote:

Some of the values in the table data have leading 0s. Are these formatted
numbers or TEXT entries? Are there any duplicate values in the data
table?

--
Biff
Microsoft Excel MVP


"eb" wrote in message
...
Need formula to lookup a value from a table and return the
corresponding
column heading.
For example, I would like to look up the value 12 and have the formula
return 2222.
Example of table - Table is 6 columns x 9 rows. No row headers just
column
headers.

A B
1111 2222
1 06 07
2 09 10
3 11 12

Appreciate the help






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Return the value of a column heading Eric Excel Discussion (Misc queries) 1 May 19th 08 10:02 PM
Return column heading Tubthumper Excel Worksheet Functions 5 April 30th 08 09:09 PM
Return Column Heading after lookup Javier Diaz[_2_] Excel Worksheet Functions 1 August 3rd 07 07:36 PM
LOOKUP and return the column heading for IF/THEN return for False NN Excel Discussion (Misc queries) 1 October 6th 06 11:24 AM
Formula to Return Column Heading den4673 Excel Discussion (Misc queries) 4 February 13th 06 09:55 PM


All times are GMT +1. The time now is 05:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"