Create lists of columns containing a value

Closed
wagoneer - 7 Apr 2010 à 10:54
rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 - 7 Apr 2010 à 20:05
I have a need to populate a column in one sheet with column headings from another sheet that contain a given value. I will illustrate better below.

Sheet 1 contains

A B C
1 2 1
5 5 2
7 6 3
8 9
5



I want a macro (or other technique) to create a second sheet that would read:

1 2 3 4 5 6 7 8 9
A B C A B A B C
C C B
C


So, my second sheet, column 1 would contain the headings for any column in the first sheet that contain the value "1". I hope that is easy enough to follow.

Thanks in advance

1 response

rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 766
7 Apr 2010 à 20:05
explain how you got this (or any other column)
1
A
C
C

from the data above. I am not able to figure out the pattern here