+ Reply to Thread
Results 1 to 5 of 5

Sorting a moving range.

  1. #1
    Registered User
    Join Date
    11-02-2012
    Location
    OKC
    MS-Off Ver
    Excel 2010 and Mac Excel
    Posts
    6

    Sorting a moving range.

    Hey everyone,

    I will place the code below, but basically need to know how to add a sort code for a section of data that is not always on specific lines. In other words I have data at the top that is already coded to format the way I need, but I add a couple of line after the top data and what needs to be below. This second range of data may start on row 5 this time and row 2000 next time, and it may stop on row 10 or row 6000. I need it to select this area of data and sort it by column Q and then column R, but only for this data not the data above. I need this code inserted after the "q=q+1" line in the section where it says "This section sums up the Expenditure values in column S". Hopefully I have provided enough info. Please let me know if you need more. I appreciate any help I can get.

    Please Login or Register  to view this content.


    Thanks,

    Thomas.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Sorting a moving range.

    Hi

    What data columns are to be involved (A-T)? How do you find the last row of the data to be sorted? Is it the last row of data in column Q?

    rylo

  3. #3
    Registered User
    Join Date
    11-02-2012
    Location
    OKC
    MS-Off Ver
    Excel 2010 and Mac Excel
    Posts
    6

    Re: Sorting a moving range.

    A-T all contain data that needs to be selected. I do not have anything to find the last row, but the last row needs to be included in the selection. Basically need to select the entire data after the lines inserted and sort by column q (type) and column r (date).

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Sorting a moving range.

    Hi

    Assuming that there will always be something in column A for every row (if not, then use a relevant column) then try something like

    Please Login or Register  to view this content.
    rylo

  5. #5
    Registered User
    Join Date
    11-02-2012
    Location
    OKC
    MS-Off Ver
    Excel 2010 and Mac Excel
    Posts
    6

    Re: Sorting a moving range.

    That worked Perfectly. Thanks rylo!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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