+ Reply to Thread
Results 1 to 7 of 7

Order Values

  1. #1
    Registered User
    Join Date
    08-21-2010
    Location
    Omaha, NE
    MS-Off Ver
    Excel 2003
    Posts
    45

    Order Values

    Hello Excel Forum!

    I've attached a workbook with 3 examples to work with.

    I need to know how to order values and display them as shown in column F.

    Null values should be excluded.
    Column A is sorted ascending, then column B, then column C based upon the values in the table.

    Where (e.g.) 'Scenario 3' has,
    Column A {c=1,e=1}
    Column B {c=1,e=1}
    Column C {c=3,e=2}

    And so the values in column A aren't determinate of the order, nor column B, but column C determines that the order is {e,c}.

    I'm not sure how to achieve this for the resulting order (as shown in column F). Any help very much appreciated!

    Greg
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Order Values

    I used the custom sort with 3 levels A,B,C

  3. #3
    Registered User
    Join Date
    08-21-2010
    Location
    Omaha, NE
    MS-Off Ver
    Excel 2003
    Posts
    45

    Re: Order Values

    Thanks for the reply. I don't think I have that custom function. Would you post the code or attach the workbook that you used please?

  4. #4
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Order Values

    Attached is your workbook with the sorted scenarios on the right.

    choose the range: for the first scenario it would be A2:D7 by highlighting over it

    Then, in the [home tab] look for [sort and filter] and then click the [custom sort] option

    First level is the column B range (in this case each senario was dealt separately)
    Second level is the column C range
    Third level is the column D range

    Click OK and the result should look like the data in H2:j7 in the workbook

    I presume that Excel 2003 has at least 3 levels of sorting.

    Cheers,
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-21-2010
    Location
    Omaha, NE
    MS-Off Ver
    Excel 2003
    Posts
    45

    Re: Order Values

    I made an oversight in defining this question. Thanks for the excellent answer that you provided for the question that I asked. I need the resulting column to be ordered whenever one of the values in columns A-E change automatically. I posted it under excel programming, but forgot to include that important part. This is actually an abstraction of my problem, and I intend to apply the help here to several changing data sets across many workbooks. Hopefully someone can show me how this problem can be answered automatically (and without manually initializing a macro).

  6. #6
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Order Values

    yes there is a worksheet_change() macro that will execute upon a change in the data automatically. You will just have to adjust the actual range. I will witre the macro and send it to you.

  7. #7
    Forum Expert
    Join Date
    11-28-2012
    Location
    Guatemala
    MS-Off Ver
    Excel 2010
    Posts
    2,394

    Re: Order Values

    here it goes try changing the values in sample 1 in columns h:k
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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