+ Reply to Thread
Results 1 to 9 of 9

Non Consecutive Rows Sort Data With Multiple Ranges

  1. #1
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Non Consecutive Rows Sort Data With Multiple Ranges

    Hi all,


    Once again, I'm seeking some further assistance to an issue that I have yet to resolve.

    I have several rows of data which I'd like to be able to sort by the info in column "A".
    The data rows are not all consecutive. The range for which the data resides are:
    Range("A25:A73,A85:A105,A145:A193"), When I sort I want my data to stay
    within these limits/ranges.


    Please Login or Register  to view this content.
    Any help is appeciated .

    Thanks,

    BDB
    Last edited by bdb1974; 02-26-2010 at 04:31 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Non Consecutive Rows Sort Data With Multiple Ranges

    Hello BDB,

    This macro should do it.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Re: Non Consecutive Rows Sort Data With Multiple Ranges

    Thanks Leith for your assistance.

    It appears that this sorts an indivdual column only w/o orientating the entire row.

    Can you fix this so it sorts the entire row or for the range("A:H")?

    Also, If I want to add another sort based on two columns, how would I do this?

    I'd like to sort based on column B then on A.


    Again thanks for all of your help.

    Regards,

    BDB

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Non Consecutive Rows Sort Data With Multiple Ranges

    Hello bdb,

    I see the "H" in your post now. So the range would look like this...
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Re: Non Consecutive Rows Sort Data With Multiple Ranges

    Leith,

    This is sorting each range with the RNG as a separate sort list.
    Can the 3 ranges be sorted as a single list ? As if, there were no blank rows between them and w/o affecting/moving the blank rows in the sort ?

    thanks,

    BDB

  6. #6
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Re: Non Consecutive Rows Sort Data With Multiple Ranges

    Is there way to handle sorting two ranges as a single range?

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Non Consecutive Rows Sort Data With Multiple Ranges

    You could copy the several areas to a blank worksheet, do one contiguous sort, and then copy by area back to the original ranges.
    Entia non sunt multiplicanda sine necessitate

  8. #8
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Re: Non Consecutive Rows Sort Data With Multiple Ranges

    I guess there is always a workaround solution.
    I'm really more interested in having it done "INSITU" if possible.
    If its not possible with/ Excel or with VBA coding, I'd like to know that too.

    Thanks SHG.


    BDB

  9. #9
    Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    660

    Re: Non Consecutive Rows Sort Data With Multiple Ranges

    Here's the work around I came up with to use.

    Please Login or Register  to view this content.
    Basically I'm removing the rows between the separate ranges and removing the formatting
    of the cells.

    I perform the sort by the selected column, then resplit or add the rows and the formatting back to the cells.

    I was really hoping there would be a more straight forward method of doing this w/o having to remove rows or formats from the sheet.

    Regards,


    BDB

+ 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