+ Reply to Thread
Results 1 to 2 of 2

Combobox - Sorting Data

Hybrid View

  1. #1
    teresa
    Guest

    Combobox - Sorting Data

    Sub SOR()
    I have a combobox - when I choose an option it arranges data according to
    Client which is currently in column G, however I need to sort data according
    to "Client" irrespective of the Column, how do I tinker with the code below
    to do this - Thanks


    ' SOR Macro
    ' Macro recorded 20/02/2005 by _ _
    '

    '
    Range("C9:AS69").Select
    Selection.Sort Key1:=Range("G9"), Order1:=xlAscending, Header:=xlGuess, _
    OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
    End Sub


  2. #2
    Tom Ogilvy
    Guest

    Re: Combobox - Sorting Data

    Key1:=Range("G9"),

    specifies to sort on column G. If you want to sort on some other column,
    change Key:= to point to another column in the data.

    --
    Regards,
    Tom Ogilvy

    "teresa" <teresa@discussions.microsoft.com> wrote in message
    news:C7226434-ABD3-402A-A362-83E8DA2C902E@microsoft.com...
    > Sub SOR()
    > I have a combobox - when I choose an option it arranges data according to
    > Client which is currently in column G, however I need to sort data

    according
    > to "Client" irrespective of the Column, how do I tinker with the code

    below
    > to do this - Thanks
    >
    >
    > ' SOR Macro
    > ' Macro recorded 20/02/2005 by _ _
    > '
    >
    > '
    > Range("C9:AS69").Select
    > Selection.Sort Key1:=Range("G9"), Order1:=xlAscending,

    Header:=xlGuess, _
    > OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
    > End Sub
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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