+ Reply to Thread
Results 1 to 4 of 4

Custom Filter that Displays All But in Ascending or Decending Orde

  1. #1
    Kim
    Guest

    Custom Filter that Displays All But in Ascending or Decending Orde

    I have a worksheet that is password protected. The creator of the sheet
    would like her users to be able to sort the data without unlocking the cells
    (don't want others to edit the content) which is not possible in Excel. I
    have tried recroding a macro to unprotect the sheet, perform a SORT and the
    reprotect the sheet -- but the users are still prompted to enter a password
    to unprotect the sheet.

    The creator has also added an Auto Filter to the sheet which works while
    protected. Is there a way to create a custom AutoFilter that will display
    all entries in alphabetical order? -- similar to a sort?

    Thanks. Kim

  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

    Good evening Kim

    In short, no. But you were on the right lines by writing a macro that will unprotect the sheet, sort the contents and reprotect it. You just need to specify the password (in the example below, pword1) to Excel, thus:

    ActiveSheet.Unprotect Password:="pword1"

    and something like this to reprotect it:

    ActiveSheet.Protect Password:="pword1"

    HTH

    DominicB

  3. #3
    Gord Dibben
    Guest

    Re: Custom Filter that Displays All But in Ascending or Decending Orde

    Do not know how to sort a Autofilter.

    Why not change the macro so's it doesn't ask for a password?

    Sub Sort_stuff()
    ActiveSheet.UnProtect Password:="justme"

    'your code to do the sorting

    ActiveSheet.Protect Password:="justme", DrawingObjects:=True, _
    Contents:=True, Scenarios:=True, AllowFiltering:=True
    End Sub


    Gord Dibben Excel MVP

    On Tue, 13 Sep 2005 14:28:18 -0700, Kim <[email protected]> wrote:

    >I have a worksheet that is password protected. The creator of the sheet
    >would like her users to be able to sort the data without unlocking the cells
    >(don't want others to edit the content) which is not possible in Excel. I
    >have tried recroding a macro to unprotect the sheet, perform a SORT and the
    >reprotect the sheet -- but the users are still prompted to enter a password
    >to unprotect the sheet.
    >
    >The creator has also added an Auto Filter to the sheet which works while
    >protected. Is there a way to create a custom AutoFilter that will display
    >all entries in alphabetical order? -- similar to a sort?
    >
    >Thanks. Kim



  4. #4
    Kim
    Guest

    Re: Custom Filter that Displays All But in Ascending or Decending

    Thank you Thank you Thank you to both.

    "dominicb" wrote:

    >
    > Good evening Kim
    >
    > In short, no. But you were on the right lines by writing a macro that
    > will unprotect the sheet, sort the contents and reprotect it. You just
    > need to specify the password (in the example below, pword1) to Excel,
    > thus:
    >
    > ActiveSheet.Unprotect Password:="pword1"
    >
    > and something like this to reprotect it:
    >
    > ActiveSheet.Protect Password:="pword1"
    >
    > HTH
    >
    > DominicB
    >
    >
    > --
    > dominicb
    > ------------------------------------------------------------------------
    > dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
    > View this thread: http://www.excelforum.com/showthread...hreadid=467269
    >
    >


+ 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