+ Reply to Thread
Results 1 to 4 of 4

Macro to sort user defined data

  1. #1
    Forum Contributor
    Join Date
    01-29-2008
    Location
    Scotland
    MS-Off Ver
    2003
    Posts
    237

    Macro to sort user defined data

    I have had a look on the forum, but cant find anything to help me

    Im a newbie in this so please bear with me

    I have tried to edit or rewrite a macro i had for something else but it didnt work as such.

    What im trying to do is sort data on a protected sheet that has locked cells.

    So what im trying to do is allow the user to select the area he/she wants to sort. Unprotect the sheet, do the sorting in a predetemined order and then lock the sheet.

    Sounds easy, but every timei recorded a macro it recorded the sorting area, This is different and therefore it needs to be selected by the user.

    Hopes that makes sense

    G

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Macro to sort user defined data

    Best to post up what you have thus far... in short you can use Selection to determine the active range (at time of routine being invoked).

    I would also ask you PM a Mod to have this moved to the Excel Programming forum (parent of this one).

  3. #3
    Forum Contributor
    Join Date
    01-29-2008
    Location
    Scotland
    MS-Off Ver
    2003
    Posts
    237

    Re: Macro to sort user defined data

    I thought i had posted this in the Excel Programming forum.. ???

    Below is the macro as recorded, as you can see i had to select an area to record the macro. What i need is for the user to be able to select the area, as they would have to do this a number of times on the sheet.




    Please Login or Register  to view this content.
    Thanks

    G
    Last edited by drgogo; 02-24-2009 at 05:19 AM.

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988

    Re: Macro to sort user defined data

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

+ 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