Dynamically extract unique records to a horizontal column header with formula

DavisNRJr

New Member
Joined
Aug 5, 2012
Messages
29
Dear Smartest Excelers in the World

I have a list1 in column A starting in cell a1 and a host of other list in column B-M.
I would like to extract unique values from list 1 and create a dynamic column Header for a new table.

Example:

list 1
1
1
2
3
4
4
5
6
7
7
7

New Table with Dynamic Header Column from list 1
1 2 3 4 5 6 7
Formula is desired.

Thanks Davis
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Dear Smartest Excelers in the World

I have a list1 in column A starting in cell a1 and a host of other list in column B-M.
I would like to extract unique values from list 1 and create a dynamic column Header for a new table.

Example:

list 1
1
1
2
3
4
4
5
6
7
7
7

New Table with Dynamic Header Column from list 1
1 2 3 4 5 6 7
Formula is desired.

Thanks Davis
Where do you want the results to appear?

What version of Excel are you uisng?

Is the data really numbers that are sorted in ascending order?
 
Upvote 0
Edit post posting: Oops, misread the requirement, thought you wanted list of those with just one of in the list. Ignore. (Love the way it puts 4 asterisks in the 'reason for editing' field!

Array-Enter formula into F5 and copy to right:
*ABCDEFGHIJ
list 1*********
*********
*********
*********
****
*********
*********
*********
*********
*********
*********
*********
**********
**********
**********

<tbody>
[TD="bgcolor: #cacaca, align: center"]1[/TD]

[TD="bgcolor: #cacaca, align: center"]2[/TD]
[TD="align: right"]1[/TD]

[TD="bgcolor: #cacaca, align: center"]3[/TD]
[TD="align: right"]1[/TD]

[TD="bgcolor: #cacaca, align: center"]4[/TD]
[TD="align: right"]2[/TD]

[TD="bgcolor: #cacaca, align: center"]5[/TD]
[TD="align: right"]3[/TD]

[TD="bgcolor: #ccffcc, align: right"]2[/TD]
[TD="bgcolor: #ccffcc, align: right"]3[/TD]
[TD="bgcolor: #ccffcc, align: right"]5[/TD]
[TD="bgcolor: #ccffcc, align: right"]6[/TD]
[TD="bgcolor: #ccffcc"]#NUM![/TD]

[TD="bgcolor: #cacaca, align: center"]6[/TD]
[TD="align: right"]4[/TD]

[TD="bgcolor: #cacaca, align: center"]7[/TD]
[TD="align: right"]4[/TD]

[TD="bgcolor: #cacaca, align: center"]8[/TD]
[TD="align: right"]5[/TD]

[TD="bgcolor: #cacaca, align: center"]9[/TD]
[TD="align: right"]6[/TD]

[TD="bgcolor: #cacaca, align: center"]10[/TD]
[TD="align: right"]7[/TD]

[TD="bgcolor: #cacaca, align: center"]11[/TD]
[TD="align: right"]7[/TD]

[TD="bgcolor: #cacaca, align: center"]12[/TD]
[TD="align: right"]7[/TD]

[TD="bgcolor: #cacaca, align: center"]13[/TD]

[TD="bgcolor: #cacaca, align: center"]14[/TD]

[TD="bgcolor: #cacaca, align: center"]15[/TD]

</tbody>

Spreadsheet Formulas
CellFormula
F5{=SMALL(IF(COUNTIF($A$2:$A$12,$A$2:$A$12)=1,$A$2:$A$12),COLUMN()-5)}

<tbody>
</tbody>
Formula Array:
Produce enclosing
{ } by entering
formula with CTRL+SHIFT+ENTER!

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Last edited:
Upvote 0
I am putting them into a new worksheet using Office 2010. The values are "34 Letters" Format.
Let's assume your data is on Sheet1 in the range A1:A11.

On some other sheet...

Enter this formula in A1:

=Sheet1!A1

Enter this array formula** in B1:

=IFERROR(INDEX(Sheet1!$A1:$A11,MATCH(0,COUNTIF($A1:A1,Sheet1!$A1:$A11),0)),"")

** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.

Copy across until you get blanks.
 
Upvote 0

Forum statistics

Threads
1,223,268
Messages
6,171,100
Members
452,379
Latest member
IainTru

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
Back
Top