+ Reply to Thread
Results 1 to 6 of 6

How to create unique list for secondary category in a messy data set

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    01-12-2021
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    118

    How to create unique list for secondary category in a messy data set

    Hi,

    I know how to create a unique primary list. How do I create a unique secondary list based on a category in the primary list without having to make a unique primary list first?
    I hope this is not as confusing as it sounds. I have included a mock excel spreadsheet that will demonstrate what I am trying to do.

    Thanks for your help adn suggestions!! P.S has to work in excel 2010.

    Thanks,
    Mia
    Attached Files Attached Files
    Last edited by AliGW; 01-16-2021 at 02:17 AM. Reason: Solved tag applied - no need to edit the title.

  2. #2
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,870

    Re: How to create unique list for secondary category in a messy data set

    How about
    =IFERROR(INDEX(Table1[Category 2],AGGREGATE(15,6,(ROW(Table1[Category 2])-ROW('Messy Data set'!B$3)+1)/(Table1[Category 1]=B$3)/(ISNA(MATCH(Table1[Category 2],B$3:B3,0))),1)),"")

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,792

    Re: How to create unique list for secondary category in a messy data set

    In B4 copied down:

    =IFERROR(INDEX(Table1[Category 2],AGGREGATE(15,6,ROW($3:$500)/(Table1[Category 1]=Table2[[#Headers],[Plant]]),ROW(1:1))),"")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  4. #4
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,706

    Re: How to create unique list for secondary category in a messy data set

    one option, for XL2010, utilising structured references:

    B4:
    =IF($B3="","",IFERROR(INDEX(Table1[Category 2],AGGREGATE(15,6,(ROW(Table1[Category 2])-ROW(Table1[#Headers]))/(Table1[Category 1]=$B$3)/ISNA(MATCH(Table1[Category 2],$B$3:$B3,0)),1)),""))
    copied down

    if you're working with big datasets I would advocate the pre-emptive null string test on prior result -- this will limit how many times you execute the AGGREGATE unnecessarily (to once) - without doing a unique count (expensive)

  5. #5
    Forum Contributor
    Join Date
    01-12-2021
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    118

    Re: How to create unique list for secondary category in a messy data set

    Thanks. It's good to see the different options to use. These worked for me.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,792

    Re: How to create unique list for secondary category in a messy data set

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. I did this for you today - no need to edit the thread title.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. [SOLVED] Create a unique list using data validation.
    By NainaH in forum Excel General
    Replies: 7
    Last Post: 01-04-2020, 06:00 AM
  2. Create unique list from data but listed in order based on a different list
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-24-2016, 12:54 PM
  3. [SOLVED] Create Unique List from Data based on Critera
    By DomSza in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-10-2015, 10:52 AM
  4. [SOLVED] Create Unique List from Data
    By scalesy in forum Excel General
    Replies: 9
    Last Post: 02-13-2014, 09:51 AM
  5. Create category list based on master list
    By dviacono in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-16-2013, 10:58 AM
  6. Create a unique list from column of data in excel using vba
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-02-2012, 09:03 AM
  7. How to create the unique list from data
    By excelearner in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-27-2008, 10:56 PM

Tags for this Thread

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