SOLVED
Home

Filter in a protected xlsx sheet.

%3CLINGO-SUB%20id%3D%22lingo-sub-190758%22%20slang%3D%22en-US%22%3EFilter%20in%20a%20protected%20xlsx%20sheet.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-190758%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20created%20a%20protected%20sheet%20where%20there%20is%20a%20table%20and%20several%20columns%20have%20a%20read%20only%20data.%20The%20user%20can%20only%20fill%20data%20in%20a%20few%20of%20columns.%20I%20want%20to%20enable%20filtering%20in%20this%20sheet%20but%20that%20option%20is%20greyed%20out%20in%20the%20protected%20sheet.%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20using%20Office%202016.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-190758%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%20on%20Mac%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-190780%22%20slang%3D%22en-US%22%3ERe%3A%20Filter%20in%20a%20protected%20xlsx%20sheet.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-190780%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETo%20allow%20users%20to%20sort%20the%20data%2C%20you%20have%20to%20%3CSTRONG%3Eunlock%20cells%3C%2FSTRONG%3Ein%20your%20table%20and%20turn%20on%20the%20%3CSTRONG%3Efilter%3C%2FSTRONG%3Eif%20you%20wish%20before%20you%20apply%20the%20protection.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAll%20cells%20in%20the%20Excel%20worksheet%20are%20locked%20by%20default%2C%20to%20learn%20how%20to%20unlock%20a%20specific%20range%20of%20cells%2C%20please%20follow%20this%20%3CA%20href%3D%22https%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2FLock-cells-to-protect-them-in-Excel-2016-for-Mac-59bb04cf-1a79-4a69-9828-568c98bdb310%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Elink%3C%2FA%3E.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAfter%20you%20unlock%20the%20cells%20and%20turn%20on%20the%20filter%20you%20can%20go%20ahead%20and%20apply%20the%20protection.%3CBR%20%2F%3EBut%20don't%20forget%20to%20check%20the%20Filter%20checkbox%2C%20and%20Sort%20checkbox%20as%20well.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20hope%20this%20helps%20you%3C%2FP%3E%3CP%3ERegards%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-190777%22%20slang%3D%22en-US%22%3ERe%3A%20Filter%20in%20a%20protected%20xlsx%20sheet.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-190777%22%20slang%3D%22en-US%22%3EHello%2C%20You%20are%20right.%20It%20is%20correct.%3CBR%20%2F%3EI%20have%20the%20same%20question%20for%20sorting%20too.%20If%20you%20can%20help%20me%20regarding%20that%20too%20then%20I%20would%20really%20appreciate%20it.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-190765%22%20slang%3D%22en-US%22%3ERe%3A%20Filter%20in%20a%20protected%20xlsx%20sheet.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-190765%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20try%20to%20enable%20the%20filter%20%3CSTRONG%3Ebefore%3C%2FSTRONG%3Eyou%20protect%20the%20worksheet.%3C%2FP%3E%3CP%3EAnd%20when%20you%20go%20to%20protect%20it%2C%20check%20the%20Filter%20check%20box%20to%20allow%20users%20to%20use%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CIMG%20src%3D%22https%3A%2F%2Fsupport.content.office.net%2Fen-us%2Fmedia%2F091e38de-cb42-406d-9e16-1934bf31d6fd.png%22%20alt%3D%22Elements%20available%20for%20protection%20within%20a%20sheet%22%20title%3D%22Elements%20available%20for%20protection%20within%20a%20sheet%22%20border%3D%220%22%20%2F%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22%22%3EIt%20works%20in%20Excel%20for%20Windows%2C%20and%20I%20think%20it%20will%20work%20on%20Mac%20as%20well.%3CBR%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGood%20luck%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-778370%22%20slang%3D%22en-US%22%3ERe%3A%20Filter%20in%20a%20protected%20xlsx%20sheet.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-778370%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F35679%22%20target%3D%22_blank%22%3E%40Haytham%20Amairah%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20have%20the%20same%20issue%20but%20I%20understand%20how%20to%20unlock%20cells%20and%20choose%20for%20sorting%20and%20filtering%20before%20I%20protect%20the%20sheet.%20It%20still%20doesn't%20allow%20me%20to%20sort%20the%20data.%20I%20read%20that%20the%20cells%20must%20all%20be%20unlocked%20but%20is%20there%20a%20way%20to%20filter%20even%20when%20some%20of%20the%20cells%20are%20locked%3F%20I%20have%20formulas%20and%20am%20afraid%20those%20using%20it%20will%20accidently%20delete%20the%20formulas%20without%20protection.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-779393%22%20slang%3D%22en-US%22%3ERe%3A%20Filter%20in%20a%20protected%20xlsx%20sheet.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-779393%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F384028%22%20target%3D%22_blank%22%3E%40wlmexcelfun%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20filter%2C%20sort%2C%20and%20delete%20are%20types%20of%20editing%2C%20so%20you%20can't%20restrict%20one%20without%20the%20other!%3C%2FP%3E%3CP%3EIf%20you%20want%20to%20prevent%20the%20users%20from%20deleting%20the%20content%2C%20you%20will%20prevent%20them%20from%20sorting%20and%20filtering%20as%20well.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-779482%22%20slang%3D%22en-US%22%3ERe%3A%20Filter%20in%20a%20protected%20xlsx%20sheet.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-779482%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F384028%22%20target%3D%22_blank%22%3E%40wlmexcelfun%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20just%20discover%20a%20fairly%20good%20solution%20for%20this.%3C%2FP%3E%3CUL%3E%3CLI%3Ekeep%20all%20cells%20in%20the%20locked%20state%20which%20is%20the%20default%3C%2FLI%3E%3CLI%3EEnable%20the%20AutoFilter%3C%2FLI%3E%3CLI%3EBefore%20you%20enable%20the%20protection%2C%20go%20to%20Review%20%26gt%3B%26gt%3B%20Protect%20%26gt%3B%26gt%3B%20Allow%20Edit%20Ranges%3C%2FLI%3E%3CLI%3EAdd%20the%20range%20that%20you%20want%20as%20the%20below%20screenshot%3C%2FLI%3E%3CLI%3EPress%20the%20Protect%20Sheet%20button%20in%20the%20same%20dialog%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F124950i126A7981B8190D5C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%222019-07-30_19-43-33.png%22%20title%3D%222019-07-30_19-43-33.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CUL%3E%3CLI%3EIn%20the%20Protect%20Sheet%2C%20deselect%20the%20first%20two%20options%20and%20select%20only%3A%20%3CSTRONG%3ESort%3C%2FSTRONG%3Eand%20%3CSTRONG%3EUse%20AutoFilter%3C%2FSTRONG%3E%3C%2FLI%3E%3CLI%3EHit%20OK%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20will%20prevent%20the%20users%20from%20accidentally%20delete%20any%20cell's%20content%20by%20preventing%20them%20from%20even%20select%20the%20cells%20%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3Ebut%20they%20will%20still%20be%20allowed%20to%20use%20the%20Sort%20and%20Filter!%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20that%20helps%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-784989%22%20slang%3D%22en-US%22%3ERe%3A%20Filter%20in%20a%20protected%20xlsx%20sheet.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-784989%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F35679%22%20target%3D%22_blank%22%3E%40Haytham%20Amairah%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you!!!%20This%20worked%20perfectly!%3C%2FP%3E%3C%2FLINGO-BODY%3E
Ramandeep Singh
New Contributor

I have created a protected sheet where there is a table and several columns have a read only data. The user can only fill data in a few of columns. I want to enable filtering in this sheet but that option is greyed out in the protected sheet. 

I am using Office 2016. 

7 Replies
Solution

Hi,

 

Please try to enable the filter before you protect the worksheet.

And when you go to protect it, check the Filter check box to allow users to use it.

 

Elements available for protection within a sheet

 

 

It works in Excel for Windows, and I think it will work on Mac as well.

 

Good luck

Hello, You are right. It is correct.
I have the same question for sorting too. If you can help me regarding that too then I would really appreciate it.

Hi,

 

To allow users to sort the data, you have to unlock cells in your table and turn on the filter if you wish before you apply the protection.

 

All cells in the Excel worksheet are locked by default, to learn how to unlock a specific range of cells, please follow this link.

 

After you unlock the cells and turn on the filter you can go ahead and apply the protection.
But don't forget to check the Filter checkbox, and Sort checkbox as well.

 

I hope this helps you

Regards

@Haytham Amairah 

Hi,

I have the same issue but I understand how to unlock cells and choose for sorting and filtering before I protect the sheet. It still doesn't allow me to sort the data. I read that the cells must all be unlocked but is there a way to filter even when some of the cells are locked? I have formulas and am afraid those using it will accidently delete the formulas without protection.

@wlmexcelfun

 

The filter, sort, and delete are types of editing, so you can't restrict one without the other!

If you want to prevent the users from deleting the content, you will prevent them from sorting and filtering as well.

Highlighted

@wlmexcelfun

 

I just discover a fairly good solution for this.

  • keep all cells in the locked state which is the default
  • Enable the AutoFilter
  • Before you enable the protection, go to Review >> Protect >> Allow Edit Ranges
  • Add the range that you want as the below screenshot
  • Press the Protect Sheet button in the same dialog

2019-07-30_19-43-33.png

 

  • In the Protect Sheet, deselect the first two options and select only: Sort and Use AutoFilter
  • Hit OK

 

This will prevent the users from accidentally delete any cell's content by preventing them from even select the cells but they will still be allowed to use the Sort and Filter!

 

Hope that helps

@Haytham Amairah 

Thank you!!! This worked perfectly!

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
38 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies