+ Reply to Thread
Results 1 to 16 of 16

Help with custome sorting

  1. #1
    Registered User
    Join Date
    10-06-2015
    Location
    Albany
    MS-Off Ver
    2007
    Posts
    18

    Help with custome sorting

    I'm looking to find a way to custom sort when each item consists of two lines but I need to sort by date. In the example that i've attached, I need it to show task 2, 1, 3 in that order by start date. How can I sort it to also keep the end date right below it. Keep in mind this is not the acutal data and it has to stay in this format.

    Thanks.Book1.xlsx

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Help with custome sorting

    You need to duplicate the task ID in each row to keep the tasks together. Or you could put the end date in a separate column and use a single row per task.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    10-06-2015
    Location
    Albany
    MS-Off Ver
    2007
    Posts
    18

    Re: Help with custome sorting

    Book1(1).xlsx

    that's what i thoought too but it didn't work. see attached

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Help with custome sorting

    Which column do you need to sort on first if you want to keep the tasks together?

  5. #5
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,784

    Re: Help with custome sorting

    As far as I can see selecting the range A3:D8 and on the "Home" tab selecting "Sort & Filter" and using "Sort smallest to largest" gives you the result you wanted (tested with excel 2007 and 2010)

    Alf

  6. #6
    Registered User
    Join Date
    10-06-2015
    Location
    Albany
    MS-Off Ver
    2007
    Posts
    18

    Re: Help with custome sorting

    I need the start and end date to stay together. So both rows for task 1, both rows for task 2, both rows for task 3. Rather, it sorts just the dates leaving them all discombobulated. The biggest issue is that the start date is fluid, so as the start date of the task changes i need a quick and easy way to sort hundreds of lines but they have to stay in rows of 2.

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Help with custome sorting

    You're sorting by the date column and then the task column. Reverse that.

  8. #8
    Registered User
    Join Date
    10-06-2015
    Location
    Albany
    MS-Off Ver
    2007
    Posts
    18

    Re: Help with custome sorting

    I'm sorry, I'm not trying to be stupid here. If i sort by task, it puts it numerically, If i sort by date first, it makes it all discombobulated. In the example that I attached, I need rows 3&4 to sort by 10/23. I need rows 5&6 to sort by 10/17. I need rows 7&8 to sort by 10/26.

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Help with custome sorting

    Like this?

    Row\Col
    A
    B
    C
    D
    1
    Task
    Title
    Person
    Projected Start / End Date
    2
    1
    Mow Lawn
    Johnny no shoes
    10/23/2015
    3
    1
    10/30/2015
    4
    2
    Clean Car
    Jake the snake
    10/17/2015
    5
    2
    10/29/2015
    6
    3
    Clean House
    Marcus rucus
    10/26/2015
    7
    3
    11/19/2015


    EDIT: Or you want it like this?

    Row\Col
    A
    B
    C
    D
    1
    Task
    Title
    Person
    Projected Start / End Date
    2
    2
    Clean Car
    Jake the snake
    10/17/2015
    3
    2
    10/29/2015
    4
    1
    Mow Lawn
    Johnny no shoes
    10/23/2015
    5
    1
    10/30/2015
    6
    3
    Clean House
    Marcus rucus
    10/26/2015
    7
    3
    11/19/2015


    If that's the case, then put the end date in a separate column and sort by start date:

    Row\Col
    A
    B
    C
    D
    E
    1
    Task
    Title
    Person
    Start
    End
    2
    2
    Clean Car
    Jake the snake
    10/17/2015
    10/29/2015
    3
    1
    Mow Lawn
    Johnny no shoes
    10/23/2015
    10/30/2015
    4
    3
    Clean House
    Marcus rucus
    10/26/2015
    11/19/2015
    Last edited by shg; 10-20-2015 at 12:54 PM.

  10. #10
    Registered User
    Join Date
    10-06-2015
    Location
    Albany
    MS-Off Ver
    2007
    Posts
    18

    Re: Help with custome sorting

    yes, that's what i'm starting with, but now looking at the start dates of 10/23 (task 1), 10/17 (task 2) and 10/26 (task 3), i would need it to be able to sort task 2,1,3

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Help with custome sorting

    Then you need to arrange the records in database fashion, one row per task, as shown in the last example.

  12. #12
    Registered User
    Join Date
    10-06-2015
    Location
    Albany
    MS-Off Ver
    2007
    Posts
    18

    Re: Help with custome sorting

    Like i said, i need them to remain in two rows for their function of feeding a chart on another tab. when i do it your way i loose % complete on the other tab.

  13. #13
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Help with custome sorting

    I'm skeptical of the design that requires that, but you could duplicate the start date in another column and sort by that:

    Row\Col
    A
    B
    C
    D
    E
    1
    Task
    Title
    Person
    Start/End
    Start
    2
    2
    Clean Car
    Jake the snake
    10/17/2015
    10/17/2015
    3
    10/29/2015
    10/17/2015
    4
    1
    Mow Lawn
    Johnny no shoes
    10/23/2015
    10/23/2015
    5
    10/30/2015
    10/23/2015
    6
    3
    Clean House
    Marcus rucus
    10/26/2015
    10/26/2015
    7
    11/19/2015
    10/26/2015

  14. #14
    Registered User
    Join Date
    10-06-2015
    Location
    Albany
    MS-Off Ver
    2007
    Posts
    18

    Re: Help with custome sorting

    It's not the cleanest and i'm sure my formatting isn't right on the other chart page, but in the end i can hid column e and this works.

    Thanks for your help. I appreciate it.

  15. #15
    Registered User
    Join Date
    10-06-2015
    Location
    Albany
    MS-Off Ver
    2007
    Posts
    18

    Re: Help with custome sorting

    I'll ask one more question if you are still out there... Can i set up a function (like print area) for sorting so that it is already set up for the end user. All they will have to do is click a button, or is this to far out there?

  16. #16
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Help with custome sorting

    Sure. Try recording a macro and then it can be cleaned up.

+ 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. [SOLVED] Custome Number Fromatting HELP!
    By MG3 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-20-2015, 02:44 PM
  2. [SOLVED] Custome formula
    By Sparkplug90 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-15-2013, 03:58 AM
  3. Custome table style
    By sherry_1991 in forum Excel General
    Replies: 0
    Last Post: 01-10-2013, 12:32 PM
  4. Custome Sort By Value on 2 Pages
    By bdb1974 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-27-2009, 12:34 PM
  5. Custome AutoFilter
    By nicolachen in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-21-2007, 01:53 AM
  6. [SOLVED] Custome number format help
    By WB in forum Excel General
    Replies: 2
    Last Post: 07-21-2006, 04:10 PM
  7. Custome Colors?
    By Mark in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-21-2005, 11:06 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