+ Reply to Thread
Results 1 to 6 of 6

Create unique array from columns with multiple repeats

  1. #1
    Forum Contributor
    Join Date
    12-02-2008
    Location
    Brisbane
    MS-Off Ver
    2016
    Posts
    807

    Create unique array from columns with multiple repeats

    I am trying to create an array of unique types/colours from data which contains numerous duplicates. I have tried pivot tables but that didn't work so I am resorting to formula. I am trying to avoid VBA. Any assistance is much appreciated. I have uploaded a sample file.
    Attached Files Attached Files

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,370

    Re: Create unique array from columns with multiple repeats

    Put in F8 and array ENTERED and copied down and cross

    =IFERROR(INDEX($B$8:$B$39,AGGREGATE(15,6,IF(FREQUENCY(IFERROR(MATCH(IF($A$8:$A$39=F$7,$B$8:$B$39),$B$8:$B$39,0),""),ROW($A$8:$A$39)-ROW($A$8)+1),ROW($A$8:$A$39)-ROW($A$8)+1),ROWS($A$1:A1))),"")
    Attached Files Attached Files

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Create unique array from columns with multiple repeats

    Try this...

    This array formula** entered in F8:

    =IFERROR(INDEX($B$8:$B$39,MATCH(0,IF($A$8:$A$39=F$7,COUNTIF(F$7:F7,$B$8:$B$39)),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 to K8 then down until you get a row full of blanks.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Forum Contributor
    Join Date
    12-02-2008
    Location
    Brisbane
    MS-Off Ver
    2016
    Posts
    807

    Re: Create unique array from columns with multiple repeats

    Hi Azumi

    I can sort of understand most of it but how does the "Aggregate(15,6if(Frequency" part work

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Create unique array from columns with multiple repeats

    Hi Bob,

    See the attached where I believe in shorter steps. *First you should do an Advanced Filter with your data to only leave unique data. Then create a Counter column and to make it easy, a helper column. Then create your matrix with a simple index match formula. See the attached.

    Index Match with help for Bob.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  6. #6
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Create unique array from columns with multiple repeats

    Here's your file with the formula implemented.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. MATCH Array and Create a Unique ID
    By T86157 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-14-2016, 10:00 PM
  2. [SOLVED] Create a unique list from multiple columns with blamks
    By JO505 in forum Excel General
    Replies: 14
    Last Post: 11-18-2015, 08:25 PM
  3. Random number generation across multiple ros/columns without repeats
    By Zodeeak in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-27-2014, 03:15 PM
  4. [SOLVED] VBA: Pull unique text records from multiple columns and store into array?
    By kaptenstofil in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-24-2014, 10:39 AM
  5. Replies: 4
    Last Post: 01-26-2014, 05:48 PM
  6. Replies: 2
    Last Post: 07-17-2012, 02:06 PM
  7. Multiple selections from a pick list - only unique selections (no repeats) ?
    By opsayo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-24-2011, 06:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1