+ Reply to Thread
Results 1 to 2 of 2

Add to Selected Dynamic Range for Sorting

  1. #1
    Registered User
    Join Date
    04-03-2006
    Posts
    31

    Add to Selected Dynamic Range for Sorting

    Hello: My experience with VB is very limited. I have managed to fumble around and find most of the bits and pieces of code that have been needed to obtain the desired results. I have been working on this for quite a while now. I play with it here and there and have gotten most of the features working that I wanted.
    The entire worksheet is protected and the only way for the users to enter or change any of the entries is via a userform.
    Most of the info on the worksheet is calculated by formulas (which took much trial and error to get working)
    To make a long story short what I want to do is to Sort the info by date. I have included a command button on the userform to do this, but am having trouble selecting the range that I would like to sort.
    All the dates are in column A
    I have the following code that works to select the appropriate range of dates in column A
    Range(("A7"), Range("A65536").End(xlUp)).Select this selects the entries in column A from A7, which is the first entry, up to and including the last entry
    However I want to add columns D,E,G, I & J (Including the same rows as the ones selected for column A) to the selection prior to sorting by column A

    Perhaps another way to do this would be to select the entire columns leaving out the headers (I have 6 rows of header information) The only thing is I don't know the format to specify the number of rows of header information. I was thinking that there should be no reason not to select the whole column as every cell with no entry could automatically be sent to the bottom of the list.
    Whatever help you can offer would be appreciated. Thanks

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

    Re: Add to Selected Dynamic Range for Sorting

    Hi

    Try something like

    Please Login or Register  to view this content.
    to select the entire range....

    HTH

    rylo

+ 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