Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
mz mz is offline
external usenet poster
 
Posts: 40
Default Display index of column headers in column A

A worksheet has data organized in columns that will be used to create
drop-down lists. How can I display in column A the contents in the column
headers - i.e. row A contents (which are the titles of each list) so that I
can see the names of all the column headers without having to scroll across
the screen.
Note that there are empty columns which will be filled with new lists that
will be added at later times, so the formula should ignore columns that have
not header (blank A column) and return column headers that contain text, but
without creating blank cells in column A that correspond to blank columns

Example
Column A Column C Column F
Row 1: Colors Colors Texture
Row 2: Texture
--
MZ
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Display index of column headers in column A

If you have sparse data in B1 thru IV1 (data mixed with empties) and want to
list the data in column A, then in A1 enter the array formula:

=IF(ROWS($1:1)<=COUNTA($B$1:$IV$1),INDEX($B$1:$IV$ 1,SMALL(IF($B$1:$IV$1<"",COLUMN($B$1:$IV$1)-MIN(COLUMN($B$1:$IV$1))+1),ROWS($1:1))),"")

and copy down.

This is an array formula that must be entered with CNTRL-SHFT-ENTER rather
than just the ENTER key.
--
Gary''s Student - gsnu200909


"MZ" wrote:

A worksheet has data organized in columns that will be used to create
drop-down lists. How can I display in column A the contents in the column
headers - i.e. row A contents (which are the titles of each list) so that I
can see the names of all the column headers without having to scroll across
the screen.
Note that there are empty columns which will be filled with new lists that
will be added at later times, so the formula should ignore columns that have
not header (blank A column) and return column headers that contain text, but
without creating blank cells in column A that correspond to blank columns

Example
Column A Column C Column F
Row 1: Colors Colors Texture
Row 2: Texture
--
MZ

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 561
Default Display index of column headers in column A

A little more compact Array-Formula will be:
{=LOOKUP("zzz",CHOOSE({1,2},"",INDEX($B$1:$IV$1,SM ALL(IF(TRANSPOSE($B$1:$IV$1)0,ROW($1:$255),""),RO W()))))}
*** The formula should be entered with CTRL+SHIFT+ENTER rather than with
simply ENTER.
The curly brackets {} are not to be typed, manually, those are entered by
Excel.
Micky



"MZ" wrote:

A worksheet has data organized in columns that will be used to create
drop-down lists. How can I display in column A the contents in the column
headers - i.e. row A contents (which are the titles of each list) so that I
can see the names of all the column headers without having to scroll across
the screen.
Note that there are empty columns which will be filled with new lists that
will be added at later times, so the formula should ignore columns that have
not header (blank A column) and return column headers that contain text, but
without creating blank cells in column A that correspond to blank columns

Example
Column A Column C Column F
Row 1: Colors Colors Texture
Row 2: Texture
--
MZ

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 561
Default Display index of column headers in column A

....and even shoreter:
{=INDEX($B$1:$IV$1,SMALL(IF(TRANSPOSE($B$1:$IV$1) 0,ROW($1:$255),""),ROW()))}
Micky


"מיכאל (מיקי) אבידן" wrote:

A little more compact Array-Formula will be:
{=LOOKUP("zzz",CHOOSE({1,2},"",INDEX($B$1:$IV$1,SM ALL(IF(TRANSPOSE($B$1:$IV$1)0,ROW($1:$255),""),RO W()))))}
*** The formula should be entered with CTRL+SHIFT+ENTER rather than with
simply ENTER.
The curly brackets {} are not to be typed, manually, those are entered by
Excel.
Micky



"MZ" wrote:

A worksheet has data organized in columns that will be used to create
drop-down lists. How can I display in column A the contents in the column
headers - i.e. row A contents (which are the titles of each list) so that I
can see the names of all the column headers without having to scroll across
the screen.
Note that there are empty columns which will be filled with new lists that
will be added at later times, so the formula should ignore columns that have
not header (blank A column) and return column headers that contain text, but
without creating blank cells in column A that correspond to blank columns

Example
Column A Column C Column F
Row 1: Colors Colors Texture
Row 2: Texture
--
MZ

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 561
Default Display index of column headers in column A

Forgot the "important part":
{=IF(ROW()COUNTA($B$1:$IV$1),"",INDEX($B$1:$IV$1, SMALL(IF(TRANSPOSE($B$1:$IV$1)0,ROW($1:$255),""), ROW())))}
So... not much difference between this one and my first formula...
Micky


"מיכאל (מיקי) אבידן" wrote:

...and even shoreter:
{=INDEX($B$1:$IV$1,SMALL(IF(TRANSPOSE($B$1:$IV$1) 0,ROW($1:$255),""),ROW()))}
Micky


"מיכאל (מיקי) אבידן" wrote:

A little more compact Array-Formula will be:
{=LOOKUP("zzz",CHOOSE({1,2},"",INDEX($B$1:$IV$1,SM ALL(IF(TRANSPOSE($B$1:$IV$1)0,ROW($1:$255),""),RO W()))))}
*** The formula should be entered with CTRL+SHIFT+ENTER rather than with
simply ENTER.
The curly brackets {} are not to be typed, manually, those are entered by
Excel.
Micky



"MZ" wrote:

A worksheet has data organized in columns that will be used to create
drop-down lists. How can I display in column A the contents in the column
headers - i.e. row A contents (which are the titles of each list) so that I
can see the names of all the column headers without having to scroll across
the screen.
Note that there are empty columns which will be filled with new lists that
will be added at later times, so the formula should ignore columns that have
not header (blank A column) and return column headers that contain text, but
without creating blank cells in column A that correspond to blank columns

Example
Column A Column C Column F
Row 1: Colors Colors Texture
Row 2: Texture
--
MZ



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Display index of column headers in column A

Very nice. This will go in my "tool box".
--
Gary''s Student - gsnu200909


"מיכאל (מיקי) אבידן" wrote:

Forgot the "important part":
{=IF(ROW()COUNTA($B$1:$IV$1),"",INDEX($B$1:$IV$1, SMALL(IF(TRANSPOSE($B$1:$IV$1)0,ROW($1:$255),""), ROW())))}
So... not much difference between this one and my first formula...
Micky


"מיכאל (מיקי) אבידן" wrote:

...and even shoreter:
{=INDEX($B$1:$IV$1,SMALL(IF(TRANSPOSE($B$1:$IV$1) 0,ROW($1:$255),""),ROW()))}
Micky


"מיכאל (מיקי) אבידן" wrote:

A little more compact Array-Formula will be:
{=LOOKUP("zzz",CHOOSE({1,2},"",INDEX($B$1:$IV$1,SM ALL(IF(TRANSPOSE($B$1:$IV$1)0,ROW($1:$255),""),RO W()))))}
*** The formula should be entered with CTRL+SHIFT+ENTER rather than with
simply ENTER.
The curly brackets {} are not to be typed, manually, those are entered by
Excel.
Micky



"MZ" wrote:

A worksheet has data organized in columns that will be used to create
drop-down lists. How can I display in column A the contents in the column
headers - i.e. row A contents (which are the titles of each list) so that I
can see the names of all the column headers without having to scroll across
the screen.
Note that there are empty columns which will be filled with new lists that
will be added at later times, so the formula should ignore columns that have
not header (blank A column) and return column headers that contain text, but
without creating blank cells in column A that correspond to blank columns

Example
Column A Column C Column F
Row 1: Colors Colors Texture
Row 2: Texture
--
MZ

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 561
Default Display index of column headers in column A

Be my guest... ;-)
Micky


"Gary''s Student" wrote:

Very nice. This will go in my "tool box".
--
Gary''s Student - gsnu200909


"מיכאל (מיקי) אבידן" wrote:

Forgot the "important part":
{=IF(ROW()COUNTA($B$1:$IV$1),"",INDEX($B$1:$IV$1, SMALL(IF(TRANSPOSE($B$1:$IV$1)0,ROW($1:$255),""), ROW())))}
So... not much difference between this one and my first formula...
Micky


"מיכאל (מיקי) אבידן" wrote:

...and even shoreter:
{=INDEX($B$1:$IV$1,SMALL(IF(TRANSPOSE($B$1:$IV$1) 0,ROW($1:$255),""),ROW()))}
Micky


"מיכאל (מיקי) אבידן" wrote:

A little more compact Array-Formula will be:
{=LOOKUP("zzz",CHOOSE({1,2},"",INDEX($B$1:$IV$1,SM ALL(IF(TRANSPOSE($B$1:$IV$1)0,ROW($1:$255),""),RO W()))))}
*** The formula should be entered with CTRL+SHIFT+ENTER rather than with
simply ENTER.
The curly brackets {} are not to be typed, manually, those are entered by
Excel.
Micky



"MZ" wrote:

A worksheet has data organized in columns that will be used to create
drop-down lists. How can I display in column A the contents in the column
headers - i.e. row A contents (which are the titles of each list) so that I
can see the names of all the column headers without having to scroll across
the screen.
Note that there are empty columns which will be filled with new lists that
will be added at later times, so the formula should ignore columns that have
not header (blank A column) and return column headers that contain text, but
without creating blank cells in column A that correspond to blank columns

Example
Column A Column C Column F
Row 1: Colors Colors Texture
Row 2: Texture
--
MZ

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 913
Default Display index of column headers in column A

Slightly shorter:

=IF(ROW()COUNTA($B$1:$IV$1),"",INDEX($B$1:$IV$1,S MALL(IF($B$1:$IV$10,COLUMN($A:$IU)),ROW())))

Eliminated need for TRANSPOSE by changing ROW to COLUMN.
Eliminated the second "" as SMALL will ignore FALSE.

Lars-ke


On Sun, 17 Jan 2010 09:02:01 -0800, ????? (????) ?????
<micky-a*at*tapuz.co.il wrote:

Forgot the "important part":
{=IF(ROW()COUNTA($B$1:$IV$1),"",INDEX($B$1:$IV$1 ,SMALL(IF(TRANSPOSE($B$1:$IV$1)0,ROW($1:$255),"") ,ROW())))}
So... not much difference between this one and my first formula...
Micky


"????? (????) ?????" wrote:

...and even shoreter:
{=INDEX($B$1:$IV$1,SMALL(IF(TRANSPOSE($B$1:$IV$1) 0,ROW($1:$255),""),ROW()))}
Micky


"????? (????) ?????" wrote:

A little more compact Array-Formula will be:
{=LOOKUP("zzz",CHOOSE({1,2},"",INDEX($B$1:$IV$1,SM ALL(IF(TRANSPOSE($B$1:$IV$1)0,ROW($1:$255),""),RO W()))))}
*** The formula should be entered with CTRL+SHIFT+ENTER rather than with
simply ENTER.
The curly brackets {} are not to be typed, manually, those are entered by
Excel.
Micky



"MZ" wrote:

A worksheet has data organized in columns that will be used to create
drop-down lists. How can I display in column A the contents in the column
headers - i.e. row A contents (which are the titles of each list) so that I
can see the names of all the column headers without having to scroll across
the screen.
Note that there are empty columns which will be filled with new lists that
will be added at later times, so the formula should ignore columns that have
not header (blank A column) and return column headers that contain text, but
without creating blank cells in column A that correspond to blank columns

Example
Column A Column C Column F
Row 1: Colors Colors Texture
Row 2: Texture
--
MZ


  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 913
Default Display index of column headers in column A

Even shorter:

=IF(ROW()COUNTA(B$1:IV$1),"",INDEX(B$1:IV$1,SMALL (IF(B$1:IV$10,COLUMN(A:IU)),ROW())))

Eliminated some $ where they are not needed.

Lars-ke

On Sun, 17 Jan 2010 19:00:54 +0100, Lars-ke Aspelin
wrote:

Slightly shorter:

=IF(ROW()COUNTA($B$1:$IV$1),"",INDEX($B$1:$IV$1, SMALL(IF($B$1:$IV$10,COLUMN($A:$IU)),ROW())))

Eliminated need for TRANSPOSE by changing ROW to COLUMN.
Eliminated the second "" as SMALL will ignore FALSE.

Lars-ke


On Sun, 17 Jan 2010 09:02:01 -0800, ????? (????) ?????
<micky-a*at*tapuz.co.il wrote:

Forgot the "important part":
{=IF(ROW()COUNTA($B$1:$IV$1),"",INDEX($B$1:$IV$ 1,SMALL(IF(TRANSPOSE($B$1:$IV$1)0,ROW($1:$255),"" ),ROW())))}
So... not much difference between this one and my first formula...
Micky


"????? (????) ?????" wrote:

...and even shoreter:
{=INDEX($B$1:$IV$1,SMALL(IF(TRANSPOSE($B$1:$IV$1) 0,ROW($1:$255),""),ROW()))}
Micky


"????? (????) ?????" wrote:

A little more compact Array-Formula will be:
{=LOOKUP("zzz",CHOOSE({1,2},"",INDEX($B$1:$IV$1,SM ALL(IF(TRANSPOSE($B$1:$IV$1)0,ROW($1:$255),""),RO W()))))}
*** The formula should be entered with CTRL+SHIFT+ENTER rather than with
simply ENTER.
The curly brackets {} are not to be typed, manually, those are entered by
Excel.
Micky



"MZ" wrote:

A worksheet has data organized in columns that will be used to create
drop-down lists. How can I display in column A the contents in the column
headers - i.e. row A contents (which are the titles of each list) so that I
can see the names of all the column headers without having to scroll across
the screen.
Note that there are empty columns which will be filled with new lists that
will be added at later times, so the formula should ignore columns that have
not header (blank A column) and return column headers that contain text, but
without creating blank cells in column A that correspond to blank columns

Example
Column A Column C Column F
Row 1: Colors Colors Texture
Row 2: Texture
--
MZ


  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Display index of column headers in column A

Why use TRANSPOSE? It's not doing anything useful.

Array entered:

=IF(ROWS(A$1:A1)COUNTA(B$1:IV$1),"",INDEX($1:$1,S MALL(IF(B$1:IV$1<"",COLUMN(B1:IV1)),ROWS(A$1:A1)) ))

--
Biff
Microsoft Excel MVP


"????? (????) ?????" <micky-a*at*tapuz.co.il wrote in message
...
Forgot the "important part":
{=IF(ROW()COUNTA($B$1:$IV$1),"",INDEX($B$1:$IV$1, SMALL(IF(TRANSPOSE($B$1:$IV$1)0,ROW($1:$255),""), ROW())))}
So... not much difference between this one and my first formula...
Micky


"????? (????) ?????" wrote:

...and even shoreter:
{=INDEX($B$1:$IV$1,SMALL(IF(TRANSPOSE($B$1:$IV$1) 0,ROW($1:$255),""),ROW()))}
Micky


"????? (????) ?????" wrote:

A little more compact Array-Formula will be:
{=LOOKUP("zzz",CHOOSE({1,2},"",INDEX($B$1:$IV$1,SM ALL(IF(TRANSPOSE($B$1:$IV$1)0,ROW($1:$255),""),RO W()))))}
*** The formula should be entered with CTRL+SHIFT+ENTER rather than
with
simply ENTER.
The curly brackets {} are not to be typed, manually, those are entered
by
"Excel".
Micky



"MZ" wrote:

A worksheet has data organized in columns that will be used to create
drop-down lists. How can I display in column A the contents in the
column
headers - i.e. row A contents (which are the titles of each list) so
that I
can see the names of all the column headers without having to scroll
across
the screen.
Note that there are empty columns which will be filled with new lists
that
will be added at later times, so the formula should ignore columns
that have
not header (blank A column) and return column headers that contain
text, but
without creating blank cells in column A that correspond to blank
columns

Example
Column A Column C Column F
Row 1: Colors Colors Texture
Row 2: Texture
--
MZ





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
lookup using column headers and row headers Memphus01 Excel Discussion (Misc queries) 1 April 13th 09 04:57 PM
Based on a condition in one column, search for a year in another column, and display data from another column in the same row look [email protected] Excel Discussion (Misc queries) 1 December 27th 06 05:47 PM
Using an Index by Column Headings instead of Column Numbers Sean Bishop New Users to Excel 2 November 21st 06 09:38 PM
make column values column headers dunskii Excel Discussion (Misc queries) 5 September 19th 06 12:00 PM
Excel - returning column headers in a seperate column ExcelConfused Excel Discussion (Misc queries) 1 March 28th 06 02:49 PM


All times are GMT +1. The time now is 07:12 PM.

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

About Us

"It's about Microsoft Excel"