+ Reply to Thread
Results 1 to 6 of 6

Sorting grouped data

  1. #1
    Registered User
    Join Date
    11-28-2013
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    3

    Sorting grouped data

    Hi guys,

    I really need your help.

    I just starting a new job and i need to get this done.

    I got a sheet that can have an "infinite" number of grouped information something like this:
    ID Description Values
    s1 s2 s3 s4
    1 sdsgd 8,4,1,0
    abras 1,2,3,4
    wrgtd 6,5,2,9

    4 sdsgd 8,4,1,0
    abras 1,2,3,4
    wrgtd 6,5,2,9

    3 sdsgd 8,4,1,0
    abras 1,2,3,4
    wrgtd 6,5,2,9

    2 sdsgd 8,4,1,0
    abras 1,2,3,4
    wrgtd 6,5,2,9


    and i need to sort this by id keeping the rest of the information togetherAttachment 280890. I've searched for quite some time but i could find an answer that i understood. I donīt now nothing of VBA (but i can use it if necessary) and canīt change the way the information is presented.

    The information should be sorted like this:

    ID Description Values
    s1 s2 s3 s4
    1 sdsgd 8,4,1,0
    abras 1,2,3,4
    wrgtd 6,5,2,9

    2 sdsgd 8,4,1,0
    abras 1,2,3,4
    wrgtd 6,5,2,9

    3 sdsgd 8,4,1,0
    abras 1,2,3,4
    wrgtd 6,5,2,9

    4 sdsgd 8,4,1,0
    abras 1,2,3,4
    wrgtd 6,5,2,9

    A sample of the real sheet a the one i need to have goes below.

    data_example.xls

    Thanks in advance

  2. #2
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Sorting grouped data

    What are the max # of rows your entries might be?
    In the workbook you attached, the highest is 4 rows, for "050.409.qwq"
    But your actual data might be more.
    Please click the * icon below if I have helped.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: Sorting grouped data

    Hi and welcome to the forum

    Add a helper column (I used M, use whatever you want, and you can hide the helper later), then copy this into M3 and copy down...
    =IF(A3="",M2,A3)

    Now, sort 1st on M, then on whichever other columns you need
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Sorting grouped data

    Fdibbins - that doesn't work with his data set because he has headers above every table.
    instead you would have to enter this formula in M2 (and drag down):
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Unfortunately, because each table is of a different size, the formatting will be messed up.

    I have an idea for a solution using VLookups, but I need to know the largest table size that is possible for an entry.

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,465

    Re: Sorting grouped data

    Try
    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    11-28-2013
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Sorting grouped data

    i donīt know the largest table size. each index can have as many rows as necessary

+ 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. Sorting grouped data
    By dmendes11 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-29-2013, 06:21 AM
  2. Sorting data that is grouped together
    By jbmerrel in forum Excel General
    Replies: 0
    Last Post: 05-09-2012, 10:20 AM
  3. Sorting grouped data
    By cosmotion in forum Excel General
    Replies: 3
    Last Post: 04-22-2008, 01:15 PM
  4. [SOLVED] Sorting Grouped Data?
    By Dan in forum Excel General
    Replies: 2
    Last Post: 06-16-2005, 06:05 PM

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