+ Reply to Thread
Results 1 to 7 of 7

Sort sheet based on 2,5 criterias

  1. #1
    Registered User
    Join Date
    10-07-2014
    Location
    Salvador da Bahia, Brazil
    MS-Off Ver
    2013
    Posts
    39

    Sort sheet based on 2,5 criterias

    Hey guys.

    Let me try and explain what is a 2,5 criterias. I have a sheet that is sorted using a filter. The sorting criterias is such that:

    First: column S - sorted by letter (I want all O's coming at the top of the list and whatever row that doesn't have an O in column S should only be sorted based on column A criteria)
    Second: column A - sorted by date

    Basically this is what I want:

    want.jpg

    But this is what I get:

    get.jpg

    These are the sorting criterias:

    sorting.jpg

    Any thoughts on how to sort this would be much appreciated.

  2. #2
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Sort sheet based on 2,5 criterias

    It appears that you are sorting using a Custom List the contents of which isn't shown. The order of the sorting levels is correct to give the results that you want. It is the Custom List that I question. The dates appear to be correctly sorting in order except for the one entry that you point out. I think that when you get the column S figured out, the rest will sort itself out.

    Inspect your custom list to see that it is correct. It has to be a logical order or it won't work properly. At least that has been my experience with them.

    If you still can't get it going, upload your workbook with sensitive data removed.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  3. #3
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Sort sheet based on 2,5 criterias

    Here is a little experiment that I did with a custom sort. I put o at the beginning of the alphabet then used the custom sort on unsorted material to get this result:
    M
    N
    O
    P
    Q
    R
    S
    1
    Custom Sort list Original List After Custom sort
    2
    o
    1
    A
    4
    o
    3
    a
    2
    b
    5
    o
    4
    b
    3
    c
    8
    o
    5
    c
    4
    o
    10
    o
    6
    d
    5
    o
    1
    A
    7
    e
    6
    t
    2
    b
    8
    f
    7
    u
    3
    c
    9
    g
    8
    o
    6
    t
    10
    h
    9
    w
    7
    u
    11
    i
    10
    o
    9
    w
    12
    j
    11
    y
    11
    y
    13
    k
    12
    z
    12
    z
    14
    l
    15
    m
    16
    n
    17
    p
    18
    q
    19
    r
    20
    s
    21
    t
    22
    u
    23
    v
    24
    w
    25
    x
    26
    y
    27
    z

  4. #4
    Registered User
    Join Date
    10-07-2014
    Location
    Salvador da Bahia, Brazil
    MS-Off Ver
    2013
    Posts
    39

    Re: Sort sheet based on 2,5 criterias

    Hi newdoverman. Thank you for your reply.

    I guess I didn't quite understand what you said.
    What's happening is that Excel is bringing rows that contain 'O' entered in column S to the top - which is what I want - and then sorting the rest in alphabetical order - which isn't what I want. Only after sorting column S, it sorts column A by ascending date.

    I have attached the file as you requested.
    Maybe creating two separate filter it would do?

    Thanks.
    Attached Files Attached Files

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Sort sheet based on 2,5 criterias

    Having taken a look at your workbook, I don't know what you are doing. The order that you want doesn't make sense to me.

  6. #6
    Registered User
    Join Date
    10-07-2014
    Location
    Salvador da Bahia, Brazil
    MS-Off Ver
    2013
    Posts
    39

    Re: Sort sheet based on 2,5 criterias

    Hi newdoverman.

    The letter O stands for "ongoing projects", whereas C stands for "completed projects", and W stands for "withdrawn projects".
    What I want is that "ongoing projects" stay at the top of the list just so it is easier to edit them.
    It happens that I found my way around this. I assigned "completed projects" (C) and "withdrawn projects" (W) as number 1 in clomun Z. "Ongoing projects" (O) were assigned 0. Then, I sorted the list in ascending order based on column Z and column A, instead of column S and column A as before. And that's it.

    Thanks for helping mate.

  7. #7
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Sort sheet based on 2,5 criterias

    Great, you figured out a solution. That is sometimes the only way that you can get what you want. Helper columns solve many problems.

    Thanks for the feedback

+ 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. Trying to input data from one sheet based on two criterias on another
    By danikva in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-03-2013, 07:39 PM
  2. [SOLVED] Index / Match from another sheet based on 2 criterias (date & name)
    By chico.corrales in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-10-2013, 10:30 PM
  3. Copy and Paste Rows based on Criteria onto another sheet and sort based on oldest item
    By Kushal8684 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-25-2013, 05:37 AM
  4. [SOLVED] Macro for copying data from one column in sheet 2 based on two criterias in sheet 1
    By baardings in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-13-2012, 01:50 PM
  5. Centralized Excel sheet and a way to find values based on 3 criterias
    By Tim Georgiev in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-05-2012, 08:17 AM

Tags for this Thread

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