Consulting

Results 1 to 8 of 8

Thread: Solved: customize sort

  1. #1

    Solved: customize sort

    Hi all,
    pls. how can i sort data, that data which i define in code will be first and then will be the others.
    F.e.
    I mean. I want sort some names. I click somewhere in column with names. Then i run macro and it will sort it.
    I want, that "john" will be on the beginning of data and then other names will be sorted ascending.

    thx

  2. #2
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,081
    Location
    What is meant to happen to those names that normally would precede "John"?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  3. #3
    Everithing start after JOHN. So if there are data with name ADAM, this name starts after JOHN. Is important, that all data sort as usual, but JOHN will be first.

    It will be seems like this

    addr JOHN street city
    addr2 JOHN street2 city2
    addr3 JOHN street3 city3
    addr4 ADAM street4 city4
    addr5 ADAM street5 city5
    addr6 BEN street6 city6
    addr7 BEN street7 city7

    And of course it will be more columns belong to this names (not only one column with name)
    there will be somo adress and other ID data in rows.

  4. #4
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,081
    Location
    As in John to Z then A to I, or just John then A to Z?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  5. #5
    Site Admin VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,005
    Location
    So really, you want the list always sorted A-Z (as when you click it will sort and remain that way) but any name you click to appear at the top of the list?

    Is that correct?
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

  6. #6
    yes, i want always have name, defined in code sorted in the top of table and rest of data want to sort A-Z. But of course i mean, that the table will include the name defined in code.
    When i say it simply. It will be sort as basic function except name which will i write in code. This name will sort in top of table.

  7. #7
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778
    Have you looked at Excel>Options>Custom Lists?
    Data can be sorted by any of those custom lists or those that you define.

  8. #8
    yes, custom lists helped
    thx for your help..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •