+ Reply to Thread
Results 1 to 2 of 2

Advanced sorting help

  1. #1
    Registered User
    Join Date
    06-22-2011
    Location
    Durham, NC, USA
    MS-Off Ver
    Excel 2003
    Posts
    1

    Advanced sorting help

    Good morning all,

    I have a bit of a puzzle I am trying to solve. A thorough search of the internet and these forums have turned little to nothing of what I am looking for.

    I have a spreadsheet that is roughly 10 columns by 600 rows, and I need to sort it in a fairly odd way.

    I have a list of employees who have parts that need to be returned by a certain date. Some of these employees have more than one part, and they (usually) have different due dates, some weeks apart. I need to get parts that are due first shipped first. I also need employees with more than one part to only make one shipment.

    While I can't post a screen shot of my spreadsheet, I will try to express what I have and what I need.



    What I have:

    Name Part name Part # Due Date
    William Widget 6655 7/30/11
    Aaron Widget 2222 8/06/11
    George Widget 1111 7/11/11
    Paul Widget 1234 7/11/11
    Bill Widget 4321 7/12/11
    Bob Widget 7890 7/13/11
    George Widget 4567 8/06/11
    William Widget 9999 7/11/11

    Sorting by name, would of course, give me a list with everyone's name to only cut one order per person. However, there are names at the end of the alphabet that need an order before somone else. Sorting by date would move duplicate names way apart from one another (remember, 600-ish rows).

    What I am trying to do is sort by date, but keep duplicate names together. Something like this:

    Name Part name Part # Due Date
    George Widget 1111 7/11/11
    George Widget 4567 8/06/11
    Paul Widget 1234 7/11/11
    William Widget 9999 7/11/11
    William Widget 6655 7/30/11
    Bill Widget 4321 7/12/11
    Bob Widget 7890 7/13/11
    Aaron Widget 2222 8/06/11

    Basically, I am trying to sort overall by ascending date, but if there is a duplicate name, I want those names to appear together.

    Thanks!

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Advanced sorting help

    asuming that data starts in a1
    then try in e2
    =MAX(($A$2:$A$9=A2)*($D$2:$D$9))&"-"&A2 array entered with ctrl+shift+enter
    use this column to sort by
    correction you need to sort ascending so use
    this instead
    =MIN(IF($A$2:$A$9=A2,$D$2:$D$9,""))&"-"&A2 again array entered with ctrl+shift+enter
    Last edited by martindwilson; 06-22-2011 at 10:11 AM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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