Column headers from variety of specific text in column on another sheet?

dobby1303

New Member
Joined
Feb 10, 2016
Messages
37
Is it possible to create a set of column headers using text from a column?

I'm not looking for just a simple pivot, I'd like to filter so only one of each text value appears at the top of the column.
For example, if I have:

A
B
C
D
A
A
B

I'd like it to produce:

A B C D


The other thing I'm trying to do is have it so it's dynamic, so that if the values in the original column changes, it adds additional columns at the end of the table.

I have no idea where I'd even start with trying to do something like this.
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Eric W

MrExcel MVP
Joined
Aug 18, 2015
Messages
12,627
If your range is A2:A10, and you want the headers to be in C1, D1, E1, etc. then put this formula in C1:

=IFERROR(INDEX($A$2:$A$10,SMALL(IF($A$2:$A$10<>"",IF(MATCH($A$2:$A$10,$A$2:$A$10,0)=ROW($A$2:$A$10)-ROW($A$2)+1,ROW($A$2:$A$10)-ROW($A$2)+1)),COLUMNS($C$1:C$1))),"")

change the ranges to match your sheet, and confirm with Control+Shift+Enter. Drag to the right as far as needed. They will come out in the order they appear.

Hope this helps.
 
Upvote 0

Forum statistics

Threads
1,190,770
Messages
5,982,830
Members
439,799
Latest member
matts12

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top