+ Reply to Thread
Results 1 to 10 of 10

How to Sort and Group

  1. #1
    Registered User
    Join Date
    07-12-2017
    Location
    US
    MS-Off Ver
    Excel 2013
    Posts
    4

    How to Sort and Group

    Hi,

    I'm trying to figure out how to sort by date and how to group IDs. Essentially, this is for shipping. I want to ship the oldest order but while I am doing that, I might as well ship all the orders for the person with the oldest order.

    In the example below, John has the oldest order and 2 other orders, so I want to list him first, with all his orders, and then the next oldest order.

    For example, I have:
    Date ID Name
    6/18/2017 989 John
    6/19/2017 456 Sarah
    6/20/2017 989 John
    6/21/2017 265 Lee
    6/22/2017 989 John
    6/23/2017 123 Brad
    6/24/2017 156 Jessica

    This is what I want:
    Date ID Name
    6/18/2017 989 John
    6/20/2017 989 John
    6/22/2017 989 John
    6/19/2017 456 Sarah
    6/21/2017 265 Lee
    6/23/2017 123 Brad
    6/24/2017 156 Jessica

    Any ideas? I'm open to using a macro or pivot table.

    Thanks so much!

    Rachel

  2. #2
    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
    27,991

    Re: How to Sort and Group

    What happens if Brad (or anyone) has 4 orders with date later than John? i.e. is the rule for multiple orders for multiple people?

    Do we find the person with oldest, then person with second oldest .....?

  3. #3
    Registered User
    Join Date
    07-12-2017
    Location
    US
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: How to Sort and Group

    So we would be looking at all the orders for the person with the oldest order, then all the orders for the person with the second oldest order, etc.

    Does that make sense?

    Thanks

  4. #4
    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
    27,991

    Re: How to Sort and Group

    Attach a sample workbook (not image).

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate.

    Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  5. #5
    Registered User
    Join Date
    07-12-2017
    Location
    US
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: How to Sort and Group

    Thanks. I have uploaded a sample spreadsheet with a bit more data which may help. The first sheet is how my data is and the second sheet is what I'm hoping to figure out how to do.

  6. #6
    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
    27,991

    Re: How to Sort and Group

    Rachel,
    No file attached.

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,396

    Re: How to Sort and Group

    In the meantime this is a good as I can do.

    Row\Col
    A
    B
    C
    D
    1
    What
    I
    got
    2
    Date ID Name
    3
    6/18/2017
    989
    John
    4
    6/20/2017
    989
    John
    5
    6/22/2017
    989
    John
    6
    6/19/2017
    456
    Sarah
    7
    6/21/2017
    265
    Lee
    8
    6/24/2017
    156
    Jessica <-- Out of
    9
    6/23/2017
    123
    Brad <-- order
    10
    11
    What
    you
    want
    12
    Date ID Name
    13
    6/18/2017
    989
    John
    14
    6/20/2017
    989
    John
    15
    6/22/2017
    989
    John
    16
    6/19/2017
    456
    Sarah
    17
    6/21/2017
    265
    Lee
    18
    6/23/2017
    123
    Brad
    19
    6/24/2017
    156
    Jessica
    Dave

  8. #8
    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
    27,991

    Re: How to Sort and Group

    @Dave, No formula given!

  9. #9
    Registered User
    Join Date
    07-12-2017
    Location
    US
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: How to Sort and Group

    Hi,

    I'm having trouble attaching the spreadsheet. I am going to Manage Attachments and uploading the spreadsheet. The spreadsheet shows up in Current Attachments. Then I close the window and it goes away.

    I'm not sure what I'm doing wrong.

    Thanks
    Attached Images Attached Images
    Attached Files Attached Files

  10. #10
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,396

    Re: How to Sort and Group

    Quote Originally Posted by JohnTopley View Post
    @Dave, No formula given!
    Sorry I didn't mention I used the sort feature. My bad.

    I usually do these by sorting the right most field, tab left sort, tab left again and sort. This usually works for me. Not this time.

+ 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. Sort and Group
    By actrak in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-14-2017, 12:57 AM
  2. sort by group and total by each group
    By mheinemann in forum Excel General
    Replies: 3
    Last Post: 04-30-2015, 11:48 AM
  3. Replies: 1
    Last Post: 04-18-2014, 05:54 PM
  4. Help with Group Sort
    By amanduhhh in forum Excel General
    Replies: 1
    Last Post: 06-03-2013, 02:03 AM
  5. Replies: 1
    Last Post: 10-19-2012, 07:55 AM
  6. Sort a group of names based on the group total
    By ron2k_1 in forum Excel General
    Replies: 3
    Last Post: 08-13-2010, 01:16 PM
  7. Sort by group
    By DexterV in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 07-08-2005, 08:48 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