+ Reply to Thread
Results 1 to 8 of 8

extract unique numbers

  1. #1
    Banned User!
    Join Date
    09-04-2018
    Location
    cyprus
    MS-Off Ver
    2007
    Posts
    282

    extract unique numbers

    Hi guys, i need a formula which checks the box =E4:J13 and extracts only the unique numbers (appear only ones).Thanks so much!
    Attached Files Attached Files

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: extract unique numbers

    Using your posted workbook....
    This regular formula, copied down as far as you need, lists the unique numbers in E4:J13 (in descending order)

    If you are using Excel 2010 or greater....
    Please Login or Register  to view this content.
    Otherwise, use this regular formula:
    Please Login or Register  to view this content.
    Note: the formulas count rows beginning in Row_2 (the location of the first formula). If you put the formula in a different row, the ROWS($2:2) section must be adjusted.

    With your data, these are the results:
    Please Login or Register  to view this content.
    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    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,023

    Re: extract unique numbers

    Or maybe this (a bit shorter, if nothing else!!), if you are still using Excel 2007:

    =IFERROR(SMALL(IF(COUNTIF($A$1:$I$4,$A$1:$I$4)=1,$A$1:$I$4),ROWS(M$2:M2)),"")

    This is an array formula.
    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.


    Don't type the curly brackets yourself - it won't work...

    If you do have Excel 2010 or later a) please amend your profile and b) use Ron's first suggestion, or this (just enter):

    =IFERROR(AGGREGATE(15,6,$E$4:$J$13/(COUNTIF($E$4:$J$13,$E$4:$J$13)=1),ROWS(M$2:M2)),"")
    Attached Files Attached Files
    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

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: extract unique numbers

    Glenn:

    My biggest challenge on this thread was accommodating a unique zero, if they're a posibility.
    (I can see that I got a bit aggressive with the unnecessary INDEX(ref,0,0) in my AGGREGATE option, though)

  5. #5
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: extract unique numbers

    Quote Originally Posted by Ron Coderre View Post
    My biggest challenge on this thread was accommodating a unique zero, if they're a posibility.
    Good observation, Ron. Using Glenn's first formula, we can replace the part:

    COUNTIF($E$4:$J$13,$E$4:$J$13)

    with

    COUNTIF($E$4:$J$13,$E$4:$J$13&"")

    to circumvent this issue, I believe.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  6. #6
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: extract unique numbers

    Yes....That fixes it.
    Interesting when a thread becomes collaborative to the benefit of all.

  7. #7
    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,023

    Re: extract unique numbers

    Great! Thanks for that, a) Ron for pointing it out and b) XOR LX for the fix.

  8. #8
    Banned User!
    Join Date
    09-04-2018
    Location
    cyprus
    MS-Off Ver
    2007
    Posts
    282

    Re: extract unique numbers

    Great thanks so much my friends!!!

+ 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. Extract unique numbers
    By louis128 in forum Excel General
    Replies: 4
    Last Post: 01-08-2019, 02:30 AM
  2. Replies: 6
    Last Post: 07-04-2016, 04:52 PM
  3. Extract unique numbers from Word and search for them in Excel
    By Reen in forum Excel Programming / VBA / Macros
    Replies: 25
    Last Post: 07-08-2014, 04:28 AM
  4. Replies: 8
    Last Post: 01-10-2014, 10:55 AM
  5. Extract unique numbers from a list
    By excelbee in forum Excel General
    Replies: 7
    Last Post: 08-11-2012, 09:00 AM
  6. Replies: 2
    Last Post: 05-24-2012, 05:05 PM
  7. Replies: 2
    Last Post: 05-02-2006, 11:20 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