Auto-Extracting Unique Values from a Data Extract

jj5484

New Member
Joined
Nov 8, 2013
Messages
6
I have been working through a project and have hit a bit of a snag. I have looked in the forum search but can’t locate an answer for this issue…

The project that I have been working on takes raw data from a database and organizes it to summarize specific categories (salary, travel, materials, ect). I can’t figure out how to attach an example spreadsheet on this forum so I will try to explain the structure.

The spreadsheet has a linked data table on one sheet (called SummaryData) and a series of account tabs. Each account has their own tab. Within the account sheet, there is a column for each month of the year and a row for each of the categories. I use the sumproduct calculation to parse through the SummaryData information and populate the corresponding month and category. This works great! FYI – I will share if you shoot me your email address…

Unfortunately, I am now being asked to provide detail for each of the summarized lines. I have inserted lines between the categories and have grouped the rows accordingly (you cant see the grouping below but it is comprised of the lines that have orange in them), leaving the summary row for now (checks and balances reasons). As the existing data extract does not have this level of detail, I have had to find the correct data table -- which is now done. The issue I am having is this. For the salary area (as an example), the extract contains hundreds of names. I need a way to parse through the extract and then auto-extract the unique names on the spreadsheet in the appropriate cells. Here is an image to show you the raw data (left) and where it is going (right). The names themselves will become a parameter for the sumproduct calculation – hence my need to make this an auto-extract.

Example_zpsbed80090.jpg
[/URL][/IMG]

I have over 1600 accounts and require an automatic way to populate the names of the people who are being paid by account.
If you have an idea of how I can grab the unique values automatically and drop them in the appropriate cells, I would be grateful.
Jim
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Something liek this?


Excel 2010
ABCD
1JasonJason
2JasonJeffrey
3JasonAdam
4Jeffrey 
5Jeffrey 
6Jeffrey 
7Adam 
8Adam 
Remove Dupe Columns
Cell Formulas
RangeFormula
D1{=IFERROR(INDEX($A$1:$A$8,SMALL(IF(FREQUENCY(IF($A$1:$A$8<>"",MATCH($A$1:$A$8,$A$1:$A$8,0)),ROW($A$1:$A$8)-ROW($A$1)+1),ROW($A$1:$A$8)-ROW($A$1)+1),ROWS(A$1:A1))),"")}
D2{=IFERROR(INDEX($A$1:$A$8,SMALL(IF(FREQUENCY(IF($A$1:$A$8<>"",MATCH($A$1:$A$8,$A$1:$A$8,0)),ROW($A$1:$A$8)-ROW($A$1)+1),ROW($A$1:$A$8)-ROW($A$1)+1),ROWS(A$1:A2))),"")}
D3{=IFERROR(INDEX($A$1:$A$8,SMALL(IF(FREQUENCY(IF($A$1:$A$8<>"",MATCH($A$1:$A$8,$A$1:$A$8,0)),ROW($A$1:$A$8)-ROW($A$1)+1),ROW($A$1:$A$8)-ROW($A$1)+1),ROWS(A$1:A3))),"")}
D4{=IFERROR(INDEX($A$1:$A$8,SMALL(IF(FREQUENCY(IF($A$1:$A$8<>"",MATCH($A$1:$A$8,$A$1:$A$8,0)),ROW($A$1:$A$8)-ROW($A$1)+1),ROW($A$1:$A$8)-ROW($A$1)+1),ROWS(A$1:A4))),"")}
D5{=IFERROR(INDEX($A$1:$A$8,SMALL(IF(FREQUENCY(IF($A$1:$A$8<>"",MATCH($A$1:$A$8,$A$1:$A$8,0)),ROW($A$1:$A$8)-ROW($A$1)+1),ROW($A$1:$A$8)-ROW($A$1)+1),ROWS(A$1:A5))),"")}
D6{=IFERROR(INDEX($A$1:$A$8,SMALL(IF(FREQUENCY(IF($A$1:$A$8<>"",MATCH($A$1:$A$8,$A$1:$A$8,0)),ROW($A$1:$A$8)-ROW($A$1)+1),ROW($A$1:$A$8)-ROW($A$1)+1),ROWS(A$1:A6))),"")}
D7{=IFERROR(INDEX($A$1:$A$8,SMALL(IF(FREQUENCY(IF($A$1:$A$8<>"",MATCH($A$1:$A$8,$A$1:$A$8,0)),ROW($A$1:$A$8)-ROW($A$1)+1),ROW($A$1:$A$8)-ROW($A$1)+1),ROWS(A$1:A7))),"")}
D8{=IFERROR(INDEX($A$1:$A$8,SMALL(IF(FREQUENCY(IF($A$1:$A$8<>"",MATCH($A$1:$A$8,$A$1:$A$8,0)),ROW($A$1:$A$8)-ROW($A$1)+1),ROW($A$1:$A$8)-ROW($A$1)+1),ROWS(A$1:A8))),"")}
Press CTRL+SHIFT+ENTER to enter array formulas.
Named Ranges
NameRefers ToCells
o='Convert Amount to words'!$I$5:$AB$5
T='Convert Amount to words'!$I$7:$R$7
 
Upvote 0
Thanks Shyy...
Unfortunately, I could not get the formula to work. Here is what I have right now....

=IFERROR(INDEX(DetailData!F:F,SMALL(IF(FREQUENCY(IF(DetailData!F:F<>"",MATCH(DetailData!F:F,DetailData!F:F,0)),ROW(DetailData!F:F)-ROW('123456'!C20)+1),ROW(DetailData!F:F)-ROW('123456'!C20)+1),ROWS('123456'!C20))),"")

Where "DetailData!F:F" is the equivalent of your "A" column and "123456!C20" is the location where the first name should populate (going downward, c21, c22, c23, etc). I think my formula is ok until the very last "ROWS('123456'!C20)" which should be something like '123456!C:C" as you have "ROWS(A$1:A1)".

I have highlighted where I believe it is failing....
 
Upvote 0
Disregard -- I got it working! I realized what the issue was as soon as I pasted your entire example into a spreadsheet and reran it properly.

Thanks Shyy. (BTW -- shoot me an email with your address and I send you a gift for your help).
 
Upvote 0

Forum statistics

Threads
1,215,127
Messages
6,123,203
Members
449,090
Latest member
bes000

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