+ Reply to Thread
Results 1 to 3 of 3

Sorting data in a protected worksheet

  1. #1
    Registered User
    Join Date
    09-06-2012
    Location
    Alberton, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    30

    Sorting data in a protected worksheet

    I need help in sorting a table on a Protected worksheet. I do not know if there is a non-VBA method of doing this, or should I be using VBA.

    The table is in the Range B12:D150, and is Unprotected. I have formulas in columns F to H, which is protected.

    When I Protect the worksheet, I allow users to:

    - Select Protected Cells
    - Select Unprotected Cells
    - Sort

    I have added macros to buttons, which sorts the table correctly when the worksheet is not protected, but as soon as I protect the worksheet, I get an error message saying the worksheet is protected and therefore read-only, and I should unprotect the sheet first.

    I would like to keep the worksheet protection, as I do not want anyone to change my formulas. I would appreciate any help in resolving this problem.

  2. #2
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Sorting data in a protected worksheet

    you need to include some vba code before and after to deal with the protection

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    09-06-2012
    Location
    Alberton, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: Sorting data in a protected worksheet

    Thank you Sean. This has helped me resolve my problem.

    I have changed your code slightly:

    Please Login or Register  to view this content.

+ 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