Closed Thread
Results 1 to 4 of 4

Protect a sheet from editing, but allow AutoFilter AND sorting capabilities

  1. #1
    Registered User
    Join Date
    07-23-2014
    Location
    Karaj, Iran
    MS-Off Ver
    Excel 2014
    Posts
    9

    Protect a sheet from editing, but allow AutoFilter AND sorting capabilities

    Hello All,
    I have a sheet that contains formulas and references to other sheets. I want to protect this sheet from editing, BUT allow all users to use AutoFilter with sorting capabilities on this sheet. I tried protecting this sheet, with the option "Allow all users of this worksheet to:", and selected "Use Autofilter". However this does not work. There is a very unclear Note about this in the Excel online help. Please guide me.
    Thanks.

  2. #2
    Forum Contributor prabhuduraraj09's Avatar
    Join Date
    05-19-2012
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    330

    Re: Protect a sheet from editing, but allow AutoFilter AND sorting capabilities

    Hi Sinapourazima,

    see you again....

    Auto Filter :

    1) Before protecting the work sheet, Apply Autofilter in the Range where you want users to user auto filter
    2) Protect work sheet , with option "Allow all users of this worksheet to:" and by selecting option "Use Autofilter"

    Give a try, the Core point here is.......you must apply Autofilter and keep it ready to use by other users before protecting.
    Once you have protected the sheet. since the Auto filter is already available, User will be allowed to use the auto filter.....but they will be denied to edit data and will be denied to remove or apply auto filter.

    Sorting :
    When a cell is locked, not all worksheet protection properties operate as you’d expect. Four of the properties do not work when a cell is locked:

    AllowSort
    AllowDeleteColumns
    AllowDeleteRows
    AllowInsertHyperlinks
    This is because in order to use these features the affected cell’s content must be changed. For example, using “Sort” does not just change the order of how the cells are viewed, it actually changes the values of the cells so that they are sorted. Due to this implementation of “Sort,” this worksheet protection property does not work when the cells are locked.

    Using “Allow Users to Edit Ranges” to Allow Locked Cell Sorting (RECOMMENDED)
    This solution takes advantage of how allowing users to edit ranges makes locked cells behave like unlocked cells.

    Step 1: Make cells editable so that sorting will work.

    Add cells we want to sort to a range and make that range editable in “Allow Users to Edit Ranges.” This allows users to edit these cells when the worksheet is protected, even if they are locked cells.

    Select all the cells you would like the user to be able to sort, including their column headings.
    Go to the Data tab and click Filter. An arrow should appear next to each column header.
    Go to Review tab-> Allow Users to Edit Ranges
    Click “New…”
    Give the range a title.
    “Refers to Cells” should already contain the cells you want to allowing sorting on.
    If you want to allow only certain people to sort, give the range a password.
    Click “OK”
    Step 2: Prevent users from editing these cells

    When protecting the worksheet, uncheck “Select Locked Cells” worksheet protection property. This will prevent users from editing the cells.

    In the “Allow Users to Edit Ranges” dialog:
    Click “Protect Sheet…”
    Give the worksheet a password
    Uncheck the worksheet protection property called “Select Locked Cells”
    Check the “Sort” property and the “AutoFilter” properties
    Click “OK”
    This solution allows users to use the Auto Filter arrows in the column names or the Sort buttons in the Data tab to sort data. Another benefit is that you have the option of allowing only certain users to sort by giving the range a password. Please note that this range password is separate from the password you set to protect the sheet.


    Add reputation, if my answers helping you for your questions. and mark this thread as solved , with appropriate rating

  3. #3
    Registered User
    Join Date
    07-27-2015
    Location
    Pittsburgh, PA USA
    MS-Off Ver
    Office 2013
    Posts
    9

    Re: Protect a sheet from editing, but allow AutoFilter AND sorting capabilities

    A side-effect of unchecking "Select Locked Cells" is that users cannot select locked column headings if they want to copy and paste data elsewhere. This creates an awkward user experience.

    Is there a way to lock column headings and still allow users to select them, but not change them, and allow the autofilter feature to Sort that column work? Excel 2016.

    Ben

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,695

    Re: Protect a sheet from editing, but allow AutoFilter AND sorting capabilities

    Administrative Note:

    We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.

    Please see Forum Rule #4 about hijacking and start a new thread for your query.

    If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Protect a sheet from editing, but allow AutoFilter
    By sinapourazima in forum Excel General
    Replies: 6
    Last Post: 07-26-2014, 03:44 PM
  2. [SOLVED] Protect a Sheet with Password and autofilter options
    By devpp in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-11-2013, 07:26 AM
  3. AUTOFILTER with protect sheet
    By janger-heli in forum Excel General
    Replies: 1
    Last Post: 01-08-2009, 07:19 AM
  4. Problems with AutoFilter and Protect Sheet
    By StanPok in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-08-2008, 08:11 PM
  5. Protect Sheet: Allow cell editing but nothing else
    By jodyflorian in forum Excel General
    Replies: 3
    Last Post: 03-10-2008, 09:06 AM

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