+ Reply to Thread
Results 1 to 11 of 11

Finding Unique Values in a Range

  1. #1
    Forum Contributor
    Join Date
    02-18-2014
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2013
    Posts
    197

    Finding Unique Values in a Range

    I need helping finding the unique values in a range.

    I'm using this formula to find the first value

    {=INDEX(Y3:Y107,MATCH(TRUE,Z3:Z107>3,0))}

    And this gives me the last value

    {=INDEX(Y3:Y107,MATCH(TRUE,Z3:Z107>3,1))}

    But the flaw in the logic is that it only gives me first and last. If the unique values are in the middle of the range, it doesn't give me the information I need. In this case, my data set has three different values. How can I find the three different values in the range?
    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,373

    Re: Finding Unique Values in a Range

    Please try this using array formula
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    02-18-2014
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2013
    Posts
    197

    Re: Finding Unique Values in a Range

    Perfect! Thanks so much, Azumi.

  4. #4
    Forum Contributor
    Join Date
    02-18-2014
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2013
    Posts
    197

    Re: Finding Unique Values in a Range

    Actually...I need to take it one step further.

    I'm trying to find the unique values in column A, but they're depending on Column B. For instance, count all unique values in A when column B is equal to 6.

    How can this array formula account for that?

    {=IFERROR(INDEX($A$3:$A$107, MATCH(0,COUNTIF($D$2:D2,$A$3:$A$107),0)),"")}

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

    Re: Finding Unique Values in a Range

    Its different formula when you have condition....
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    02-18-2014
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2013
    Posts
    197

    Re: Finding Unique Values in a Range

    Azumi, it won't let me download the sample file. Can you please post the formula?

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

    Re: Finding Unique Values in a Range

    Try this:

    =IFERROR(INDEX($A$3:$A$107,SMALL(IF(FREQUENCY(IFERROR(MATCH(IF($B$3:$B$107=6,$B$3:$B$107),$B$3:$B$107,0),""),ROW($B$3:$B$107)-ROW($B$3)+1),ROW($B$3:$B$107)-ROW($B$3)+1),ROWS($A$1:A1))),"")

    and press CTRL+SHIFT+ENTER button all together (array formula), and then you can copied down until blanks.....

  8. #8
    Forum Contributor
    Join Date
    02-18-2014
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2013
    Posts
    197

    Re: Finding Unique Values in a Range

    The formula works, but I can't seem to copy it down. Am I doing something wrong?

  9. #9
    Forum Contributor
    Join Date
    02-18-2014
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2013
    Posts
    197

    Re: Finding Unique Values in a Range

    Still have the same problem. The last formula suggested works, but it won't copy down. Any ideas?

    =IFERROR(INDEX($A$3:$A$107,SMALL(IF(FREQUENCY(IFERROR(MATCH(IF($B$3:$B$107=6,$B$3:$B$107),$B$3:$B$107,0),""),ROW($B$3:$B$107)-ROW($B$3)+1),ROW($B$3:$B$107)-ROW($B$3)+1),ROWS($A$1:A1))),"")

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

    Re: Finding Unique Values in a Range

    Sorry revised for formula:

    =IFERROR(INDEX($A$1:$A$750,SMALL(IF(FREQUENCY(IF($B$1:$B$750=6,MATCH("~"&$A$1:$A$750&"",$A$1:$A$750&"",0)),ROW($A$1:$A$750)-ROW($A$1)+1),ROW($A$1:$A$750)-ROW($A$1)+1),ROWS($A$1:A1))),"")

    or see this:

    https://www.dropbox.com/s/2mvl6cn09y...2017.xlsx?dl=0


    array formula entered

  11. #11
    Forum Contributor
    Join Date
    02-18-2014
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2013
    Posts
    197

    Re: Finding Unique Values in a Range

    That's it! Thanks so much!!

+ 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. Finding Unique Values in Named Range
    By jonboy6257 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-02-2014, 04:58 PM
  2. [SOLVED] Finding Sum of Unique Values for Duplicate Values
    By LegoLand in forum Excel General
    Replies: 13
    Last Post: 03-21-2014, 06:49 PM
  3. Finding Unique Values
    By davidimurray in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-09-2007, 05:02 AM
  4. [SOLVED] Finding unique values from a filtered range
    By Rich in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-11-2006, 11:00 AM
  5. [SOLVED] Finding all unique values
    By Shawn in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-30-2005, 09:05 AM

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