+ Reply to Thread
Results 1 to 7 of 7

Formula to sort by numbers

Hybrid View

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Formula to sort by numbers

    Hello:

    Please refer to attached file.

    I need to list Unique numbers from Column E in row 1 at I1
    So basically want 10131 at I1,10134 at J1,10137 at K1,10431 at L1, 10437 at M1 and so on..
    Once this is done, i need the ID # listed from Row 3 for particular unique number as shown in attached.

    Let me know if you have any questions.
    Thanks.

    Riz
    Attached Files Attached Files

  2. #2
    Forum Contributor Obsessed's Avatar
    Join Date
    05-22-2013
    Location
    Cincinnati, Ohio
    MS-Off Ver
    Excel 365
    Posts
    215

    Re: Formula to sort by numbers

    I think VBA would be easier for this. Does each ID always only show up once?
    Want to show appreciation for the help you received from a member? Give them reps by clicking the bottom left of their post!

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,858

    Re: Formula to sort by numbers

    Try ...

    in I3

    =IFERROR(INDEX($A$2:$A$100,SMALL(IF($E$2:$E$100=I$1,ROW($A$2:$A$100)-ROW($A$2)+1,""),ROWS($A$2:A2))),"")

    Enter with Ctrl+Shift+Enter

    Copy across and down


    There appears to be problems on the format of the data: I had to retype some data to get the formula to work


    Missed first part of requirement!
    Last edited by JohnTopley; 11-09-2015 at 09:41 AM.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Formula to sort by numbers

    Hi,

    Does the attached which uses a Pivot Table work for you? It avoids the need for any formulae or VBA so unless the layout you showed is vital then this is a far simpler solution.
    Attached Files Attached Files
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Formula to sort by numbers

    Enter formula in I1 and pull it to the right until you see blanks


    Formula: copy to clipboard
    =IFERROR(INDEX($E$2:$E$97,MATCH(0,INDEX(COUNTIF($H$1:H1,$E$2:$E$97),,),)),"")


    Then in I3 use this formula

    Formula: copy to clipboard
    =IFERROR(INDEX($A:$A,AGGREGATE(15,6,ROW($E$2:$E$97)/(($E$2:$E$97=I$1)),ROWS(I$3:I3))),"")


    Pull it to the right and then down
    Last edited by AlKey; 11-09-2015 at 09:42 AM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

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

    Re: Formula to sort by numbers

    Siumilar approach for Part 1:

    =IFERROR(INDEX($E$2:$E$97,MATCH(0,INDEX(COUNTIF($H$1:H1,$E$2:$E$97),0),0)),"")

    Drag across.

    Part 2:
    =IFERROR(INDEX($A:$A,SMALL(INDEX(($E$2:$E$97<>I$1)*10^10+ROW($E$2:$E$97),0),ROWS($1:1))),"")

    Drag across and down
    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

  7. #7
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Formula to sort by numbers

    Hi Guys:

    Thanks to all for some great formula's.
    Looks like AllKey formula will work for me.
    Not to say but all of you are very smart in coming up with the great work...
    Thanks a lot to all
    Riz

+ 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. When I sort the part numbers the formula gets messed up.....is it a glitch?
    By Rlong1818 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-07-2015, 04:40 PM
  2. [SOLVED] How do you sort item numbers targeting only specific numbers?
    By matt323 in forum Excel General
    Replies: 10
    Last Post: 12-29-2013, 01:15 AM
  3. Replies: 1
    Last Post: 12-28-2013, 11:46 PM
  4. [SOLVED] Formula problem, get and sort numbers between two values
    By Michaelice in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-04-2013, 03:36 AM
  5. [SOLVED] How to merge a numbers from 3 cells, eliminate repetitive numbers, and sort such numbers?
    By david gonzalez in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-22-2012, 11:59 AM
  6. Replies: 7
    Last Post: 07-24-2010, 08:07 PM
  7. formula required to sort numbers as per given in sheet
    By kaustubhghag in forum Excel Formulas & Functions
    Replies: 27
    Last Post: 12-22-2008, 02:01 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