Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,670
Default Return the value of a column heading

Here's my data...
A B C D E F G H
1 Name First Last Jan Feb Mar Apr May
2 John ____ ____ 5 10 5
3 Jim ____ ____ 3 6 5

How do I get B2 to return "Feb" and C2 to return "Apr"; B3 to return "Jan"
and C3 to return "Mar"?

Hopefully the spacing won't lose anything when posted. Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Return the value of a column heading

Try these:

B2:

=IF(COUNT(D2:H2),INDEX(D$1:H$1,MATCH(TRUE,INDEX(D2 :H2<"",0),0)),"")

C2:

=IF(COUNT(D2:H2),LOOKUP(1E100,D2:H2,D$1:H$1),"")

Select both B2 and C2 then copy down as needed.

--
Biff
Microsoft Excel MVP


"Eric" wrote in message
...
Here's my data...
A B C D E F G
H
1 Name First Last Jan Feb Mar Apr May
2 John ____ ____ 5 10 5
3 Jim ____ ____ 3 6 5

How do I get B2 to return "Feb" and C2 to return "Apr"; B3 to return "Jan"
and C3 to return "Mar"?

Hopefully the spacing won't lose anything when posted. Thanks!



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 column heading Tubthumper Excel Worksheet Functions 5 April 30th 08 09:09 PM
*HELP* Need a cell to return a column heading dan Excel Discussion (Misc queries) 4 August 15th 07 08:19 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 01:32 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"