Closed Thread
Results 1 to 3 of 3

Macro to enter value then sort specific range

  1. #1
    Registered User
    Join Date
    08-10-2011
    Location
    Monaco
    MS-Off Ver
    Excel 2010
    Posts
    31

    Macro to enter value then sort specific range

    Hi there

    Got some great tips on writing a macro, but need further assistance. Creating a new thread because requirements have changed / become more complex and I don't want to confuse the matter.

    1 - FIND LAST ROW WITH DATA AND POST BELOW
    The first step in my macros seem to work... I need the macro to find the last row with data in column C and in the row below that type "Spares Commission" or "Commission" or "Consultant Fee" etc (see buttons with macros linked to them in file entitled "example-2).

    2 - SORT SPECIFIED RANGE
    I then need the data in range C32:M500 to be sorted first by column I, then C, then F.

    CURRENT PROBLEM:
    SORT LAYERS
    The issue at the moment is that each time I click on a button and run a macro, it sorts by adding an extra level of sorting to the range, until too many levels exist and it bugs (see "print screen" which is a screenshot showing I clicked on Commission 3 times and Spares Commission once and there are 4 layers to the sorting).

    MULTIPLE SORTING
    The second problem is that it currently only sorts on column C, not as described above - not sure how to do multiple sortings.


    Hope this is clear...
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Macro to enter value then sort specific range

    Hi,

    Try looking at this post and see if it helps.

    http://www.excelforum.com/excel-prog...hen-sorts.html

    Steffen Thomsen

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Macro to enter value then sort specific range

    Why have you started a new Thread?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

Closed 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