Results 1 to 2 of 2

Sorting data in coloums based on another coloum - Code Continuation

Threaded View

  1. #1
    Forum Contributor
    Join Date
    06-25-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2003
    Posts
    179

    Sorting data in coloums based on another coloum - Code Continuation

    Hello All,
    I wanted to know how to sort a list of data in a row based on a number in the colum next to it and then by Alphabetical order.

    So for example Coloum I contains the numbers 2, 1.2 and 1.1
    I need it so that everything if I says 1.1 then the coressponding J cell is placed in a list bellow A3. This should then be repeated for all values of 1.1. Then 1.2 should go in B3 and bellow and 2 should go in C3.

    So far i've written this bit that collects and sorts data in J based on I, but im not sure how to continue it to split it up under the A,B,C coloums in the same alphabetical order.

    Code so far
    Range("A19:J250").Select
        ActiveWindow.SmallScroll Down:=-156
        Selection.Sort Key1:=Range("I20"), Order1:=xlDescending, Key2:=Range( _
            "J20"), Order2:=xlAscending, Header:=xlYes, OrderCustom:=1, MatchCase:= _
            False, Orientation:=xlTopToBottom, DataOption1:=xlSortTextAsNumbers, _
            DataOption2:=xlSortNormal
    Test file here to show the sort Test book1.xls
    Last edited by joshnathan; 07-16-2012 at 04:30 AM.

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