+ Reply to Thread
Results 1 to 13 of 13

second level sorting using selections from droop down lists

  1. #1
    Forum Contributor
    Join Date
    11-21-2013
    Location
    KL
    MS-Off Ver
    Excel 2010
    Posts
    168

    second level sorting using selections from droop down lists

    Hi all, good day!

    I have a list and would like to give the users two level sorting options.

    I have 5 columns and the users can choose from drop down 1 as first level and drop down 2 as second level. I have create the drop down lists for both levels, where the users cannot select the same category in drop down 2 as the same in drop down 1. after making the selection, then there is a button for the users to click for sorting.

    I am capable of doing one level sorting, however, when it comes to level 2, I have no way but to write the codes for ALL options, which is very long and not efficient.

    Would appreciate if anyone can assist in helping for a shorter and dynamic codes.

    Thank you!

    Attached is my sample workbook without codes, just the design of how my drop down lists and button should look like.
    Attached Files Attached Files

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: second level sorting using selections from droop down lists

    Try this....

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Contributor
    Join Date
    11-21-2013
    Location
    KL
    MS-Off Ver
    Excel 2010
    Posts
    168

    Re: second level sorting using selections from droop down lists

    hi, thank you for the reply.

    I tried with the given codes, however, it is not working properly.
    It sorts based on first level but not the second level....

    Appreciate your assistance.

    Thank you

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: second level sorting using selections from droop down lists

    It's working fine for me

  5. #5
    Forum Contributor
    Join Date
    11-21-2013
    Location
    KL
    MS-Off Ver
    Excel 2010
    Posts
    168

    Re: second level sorting using selections from droop down lists

    hm... i don't know what went wrong then.
    The first level is working fine but the second level is not.
    I compared it using the result I do manually.
    The second level is showing neither ascending nor descending. The sequence of the data just jumbled up?

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: second level sorting using selections from droop down lists

    Refer the attached file for details
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    11-21-2013
    Location
    KL
    MS-Off Ver
    Excel 2010
    Posts
    168

    Re: second level sorting using selections from droop down lists

    deleted due to double posting
    Last edited by hcyeap; 01-31-2014 at 02:03 AM.

  8. #8
    Forum Contributor
    Join Date
    11-21-2013
    Location
    KL
    MS-Off Ver
    Excel 2010
    Posts
    168

    Re: second level sorting using selections from droop down lists

    wow... i don't know why but mine is not working although i copied the codes exactly the same.
    thank you!

    one more question though, can i use named range for my table? i need to move around my table and it's not necessary starting from A1.

    i just replaced A1 with the named range?

    thank you!

  9. #9
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: second level sorting using selections from droop down lists

    Yes you can use the named range but delete the .currentregion property from the suggested code since I used it to auto pick the total range of data.

    So when you use named range then just remove that .currenregion because you already covered that entire range in your named range

  10. #10
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: second level sorting using selections from droop down lists

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  11. #11
    Forum Contributor
    Join Date
    11-21-2013
    Location
    KL
    MS-Off Ver
    Excel 2010
    Posts
    168

    Re: second level sorting using selections from droop down lists

    I am so sorry, i missed out something and realized that when I put the codes into my actual data sheet.
    As shown in the attached file in my first post, I have two columns of text data (which are names actually).
    When these two columns are chosen, I need them to be sorted in alphabetical order (ascending) and if the rest (numbers) are chosen, they will be sorted in descending order.

    Any ideas?

    Thank you!

  12. #12
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: second level sorting using selections from droop down lists

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. 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 demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  13. #13
    Forum Contributor
    Join Date
    11-21-2013
    Location
    KL
    MS-Off Ver
    Excel 2010
    Posts
    168

    Re: second level sorting using selections from droop down lists

    Hi I managed to sort it out.
    Thank you very much for your kind assistance

+ 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. output dependent on selections from 2 drop down lists
    By Mlacour in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-29-2013, 12:08 PM
  2. Mulitple Level Dependent Lists.
    By excelkeechak in forum Excel General
    Replies: 8
    Last Post: 04-12-2011, 04:18 AM
  3. Multi-level Data Validation with Lists
    By saschagraef in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 12-16-2010, 08:49 AM
  4. Multi-level dependent lists
    By aussiemate in forum Excel General
    Replies: 6
    Last Post: 02-25-2010, 04:02 AM
  5. automatically synching selections from two validation lists
    By priyabrata in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-20-2007, 03:06 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