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

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Here is the Fish that took me a while to get in the Boat.

=IFERROR(INDEX('[Import A Clean Master Parts File QG.xlsm]A Master Clean Master Parts Fil'!$F$5:$F$59,MATCH(0,COUNTIF($A1:A1,'[Import A Clean Master Parts File QG.xlsm]A Master Clean Master Parts Fil'!$F$5:$F$59),0)),"")

Thanks Everybody.
Davis
 
Last edited:
Upvote 0
OOps,

I needed a Dynamically expanding formula. When I add items to the list in the column, I need the headers to grow with the list. Is anybody still there?, so far it works great, but it isn't expanding with added data.

Davis
 
Upvote 0
OOps,

I needed a Dynamically expanding formula. When I add items to the list in the column, I need the headers to grow with the list. Is anybody still there?, so far it works great, but it isn't expanding with added data.

Davis
:eeek:

This means we're going to have to start from scratch since you're trying to extract from another file!

One thing that can make a big difference in the readability of the formulas is using SHORT file names and sheet names! To get around the very long file/sheet names that you have I'm going to use defined named ranges.

In the file Import A Clean Master Parts File QG.xlsm, create a named range that refers to:

='A Master Clean Master Parts Fil'!$F$4:$F$100

I use down to row 100. Adjust that to suit your needs that will allow for future data addition.

I'm naming this range Rng1.

In the file where you want the unique data to appear create another named range that refers to:

='Import A Clean Master Parts File QG.xlsx'!Rng1

I'm naming this range Rng2.

Then, in the file where you want the unique data to appear, on some sheet in cell A1 enter this array formula**:

=IFERROR(INDEX(Rng2,SMALL(IF(Rng2<>"",IF(ROW(Rng2)-MIN(ROW(Rng2))+1=MATCH(Rng2,Rng2,0),ROW(Rng2)-MIN(ROW(Rng2))+1)),COLUMNS($A1:A1))),"")

** 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
OK, I will try this,
PS. I thought this post was closed after i gave it 5 stars. I would like to know if there is a way to merge the two threads?

Please advise.

Davis
 
Upvote 0
OK, I will try this,
PS. I thought this post was closed after i gave it 5 stars. I would like to know if there is a way to merge the two threads?

Please advise.

Davis
When the moderators see that there are 2 duplicate threads they may merge both threads. They will usually do that.
 
Upvote 0
Wow, That's neat. It works. I have to tell it how far to look in the range when defining the name, can I use counta to tell it how far to look in defining the name, so it can be more dynamic?
 
Upvote 0

Forum statistics

Threads
1,223,275
Messages
6,171,126
Members
452,381
Latest member
Nova88

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