+ Reply to Thread
Results 1 to 11 of 11

Auto Filter on Protected Sheet

  1. #1
    Registered User
    Join Date
    02-15-2010
    Location
    Bournemouth
    MS-Off Ver
    Excel 2003
    Posts
    76

    Cool Auto Filter on Protected Sheet

    Good morning All

    Hope you are well.

    I was wondering if you might be able to assist me with an AutoFiltering issue. I have a spreadsheet which is shared but also has an important column protected. The sheet is used by many users who use 'AutoFilter' to view certain data;Whilst I have been able to allow users to use the filters (by selecting the option whilst protecting the column), the users are complaing that they cannot use the 'Show All' function from the 'Data' menu as it is greyed out. Is there a simple way for me to allow users to utilise the 'Show All' function, or will it only work is the sheet is un-shared/un-protected?

    Thanks guys


  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile Re: Auto Filter on Protected Sheet

    Good morning Ivor

    This is quite easy as you are using Excel 2003. Unprotect the spreadsheet, then got to Tools > Protection > Protect Worksheet.
    Scroll down through the list box, find Use Autofilter, tick the box and click OK. You will then be able to use your autofilter on a protected sheet.

    Just for completeness, if you were using a version of Excel prior to 2002 (XP) then Debra Dalgleish has a solution here.

    HTH

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Auto Filter on Protected Sheet

    If I remember correctly, I think you have to make sure the AutoFilter is on before protecting
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile Re: Auto Filter on Protected Sheet

    Quote Originally Posted by royUK View Post
    If I remember correctly, I think you have to make sure the AutoFilter is on before protecting
    Good point. Should have mentioned that.

    DominicB

  5. #5
    Registered User
    Join Date
    02-15-2010
    Location
    Bournemouth
    MS-Off Ver
    Excel 2003
    Posts
    76

    Re: Auto Filter on Protected Sheet

    Quote Originally Posted by dominicb View Post
    Good morning Ivor

    This is quite easy as you are using Excel 2003. Unprotect the spreadsheet, then got to Tools > Protection > Protect Worksheet.
    Scroll down through the list box, find Use Autofilter, tick the box and click OK. You will then be able to use your autofilter on a protected sheet.

    Just for completeness, if you were using a version of Excel prior to 2002 (XP) then Debra Dalgleish has a solution here.

    HTH

    DominicB

    Hello Dominic

    Thank you for your quick reply. I have alreadyfollowed the process as you mentioned which allows users to utilize filters on protected columns, however if the users apply filters and then wish to use the 'Show All' function from the 'Data' menu bar, then all functions are greyed out. This means that rather than just being able to show everything in one click, they will have to memorise which columns they had applied a filter to and individually select 'All' from there. I was thinking that if I gave the users more rights within the protected sheet, the function may become visible again (just incase it's under DATA, FILTER, then, SHOW ALL).

    Thanks again sir

    Ivor

  6. #6
    Registered User
    Join Date
    02-15-2010
    Location
    Bournemouth
    MS-Off Ver
    Excel 2003
    Posts
    76

    Re: Auto Filter on Protected Sheet

    Hello Roy sir, thanks for your reply.

    I have attached below the reply I sent back to Dominic.

    Hello Dominic

    Thank you for your quick reply. I have already followed the process as you mentioned which allows users to utilize filters on protected columns, however if the users apply filters and then wish to use the 'Show All' function from the 'Data' menu bar, then all functions are greyed out. This means that rather than just being able to show everything in one click, they will have to memorise which columns they had applied a filter to and individually select 'All' from there. I was thinking that if I gave the users more rights within the protected sheet, the function may become visible again (just incase it's under DATA, FILTER, then, SHOW ALL).

    Thanks again sir

    Ivor

  7. #7
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile Re: Auto Filter on Protected Sheet

    Hi Ivor

    There is no available functionality to do what you require, however we can use macros to get around this.

    Put this macro into an empty module and assign it to a command button (use the Forms toolbar for the command button).
    Please Login or Register  to view this content.
    It will unprotect the sheet, remove all the autofilters and reprotect it again using password as the password (change above as required).

    To remove all filters, your users just click the buton.

    HTH

    DominicB

  8. #8
    Registered User
    Join Date
    02-15-2010
    Location
    Bournemouth
    MS-Off Ver
    Excel 2003
    Posts
    76

    Re: Auto Filter on Protected Sheet

    Thank you Dominic sir.

    I have tried your code but I was receiving an error saying 'ShowAllData' method of worksheet class failed. However this is irrelavent anyway, because the reason I am protecting the column is because some users keep changing dates, which have a knock effect on extracts for other teams (hence queries coming back all day from random areas complaining at me!!!). So if I allow the users to temporarily 'unlock' the column in question, then there would be no point in protecting it in the first place (since the very people I am protecting it against will be able to uprotect it at a click of a button).

    However I am massively grateful for you assistance here and for your time, and will just have to think of a manual solution until Microsoft add in the functionality one day (hopefully long after I am gone from this job!!! ha haha)

    Thanks again sir

    Cheers
    Ivor
    Last edited by teylyn; 08-03-2010 at 07:19 AM. Reason: removed spurious quote

  9. #9
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Auto Filter on Protected Sheet

    Ivor

    I have attached below the reply I sent back to Dominic.
    This is a forum. The posts can be read by anyone. You don't need to repeat them to make them accessible to members other than the one you replied to.

    Also, please don't quote whole posts. It's just clutter. Forget the "Quote" button. Use the Quick Reply box or the "Post Reply" button to reply to a post.

    thanks

  10. #10
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Auto Filter on Protected Sheet

    Dominic's code only unprotects the sheet temporarily. It adds protection back immediately it has shown the data.

    To use the code in a shared workbook you must first remove sharing, add the code then apply sharing again

  11. #11
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile Re: Auto Filter on Protected Sheet

    Hi Ivor
    Quote Originally Posted by Ivor View Post
    So if I allow the users to temporarily 'unlock' the column in question, then there would be no point in protecting it in the first place (since the very people I am protecting it against will be able to uprotect it at a click of a button).
    The worksheet is "temporarily uinlocked" for a fraction of a second - and then locked back up again. Certainly not long enough for a user to start altering values.

    And the macro works just fine. Take a look at the example workbook attached.

    HTH

    DominicB
    Attached Files Attached Files

+ 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