+ Reply to Thread
Results 1 to 5 of 5

"ignore-duplicates-and-create-new-list-of-unique-values-in-excel" explanation?

  1. #1
    Forum Contributor
    Join Date
    04-02-2017
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    403

    Cool "ignore-duplicates-and-create-new-list-of-unique-values-in-excel" explanation?

    Hi guys,

    I just found this:
    https://stackoverflow.com/questions/...alues-in-excel

    I dont understand how the "MATCH(, COUNTIF($B$1:B1, $A$2:$A$25), 0)" part works.

    I do understand how the COUNTIF returns an array of something like {0;1;1;0;0;...}

    I don't understand how Match(,{0;1;1;0;0;...},0) becomes "1 or 2 or 4", etc, which INDEX then uses to return unique values/string.


    Thanks,
    Jimmy

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: "ignore-duplicates-and-create-new-list-of-unique-values-in-excel" explanation?

    =IFERROR(INDEX($A$2:$A$15,MATCH(0,INDEX(COUNTIF($C$1:$C1,$A$2:$A$15),0),0)),"")

    Red: look in this range
    Orange: for any of the values in this range

    This will return a range of 0 (not found) and 1s (found)

    Green: find exact matched with 0
    Blue and return those values.

    It returns the INDEX vslue of the first zero (not previously found value) that it encouters...

    As the range in C$1:C1 increases, previously returned will be mow be "found" and will return 1s and therefore won't be counted again.

    So you get a unque list of either numbers or text.

    It does NOT return values in alphabetical order and falls over a bit if there are blanks IN AMONGST the values.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Contributor
    Join Date
    04-02-2017
    Location
    Australia
    MS-Off Ver
    2016
    Posts
    403

    Re: "ignore-duplicates-and-create-new-list-of-unique-values-in-excel" explanation?

    I just figured it out,

    the match occurs when it find's the first "0"
    Last edited by AliGW; 09-10-2017 at 02:46 AM. Reason: Unnecessary quotation removed.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,950

    Re: "ignore-duplicates-and-create-new-list-of-unique-values-in-excel" explanation?

    Jimmy - please don't quote whole posts - it's just clutter. It's OK to quote if you are responding to a post out of sequence, but limit quoted content to a few relevant lines that makes clear to whom and what you are responding. If you are responding to the opening post, there is no need to quote it at all. Thanks!

    For normal conversational replies, try using the QUICK REPLY box below.
    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.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,950

    Re: "ignore-duplicates-and-create-new-list-of-unique-values-in-excel" explanation?

    Glenn - thanks for the useful explanation, which may prove useful to others.

    Jimmy - I have marked the thread as solved.

+ 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] Column X-Ref list - Sheet1 Col A "pages", Col B:FL "Req" to Sheet2 ColA "req", ColB "page"
    By excel-card-pulled in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-07-2017, 09:30 AM
  2. Replies: 60
    Last Post: 09-09-2014, 05:37 PM
  3. Replies: 0
    Last Post: 11-22-2013, 01:36 PM
  4. [SOLVED] Remove duplicates to create list of unique values?
    By hulayogi in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-17-2013, 01:46 PM
  5. create a "live" input table for product prices from a list of automatic unique values
    By andymcnichol in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-11-2012, 06:13 AM
  6. Parse Excel 2007 data to build list of "unique"
    By SueWithQuestion in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-22-2011, 03:32 AM
  7. [SOLVED] How do I create conditional "List of Values" in Excell?
    By SANCAKLI in forum Excel General
    Replies: 2
    Last Post: 11-09-2005, 12:25 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