How to Prevent Sorting While Allowing Editing and Filtering in Excel
Question details
The user needs to restrict data sorting on an Excel worksheet while keeping editing and filtering functionalities active for collaborators.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Sharing a workbook where data integrity regarding order must be maintained, but team members still need to input data and filter specific rows.
- Observed behavior
- By default, fully protecting a sheet blocks all actions, while leaving it unprotected allows users to accidentally or intentionally change the original sort order.
Before applying sheet protection, ensure that you have applied the Data Filter to your header row and unlocked any specific cells you want users to edit, as protecting the sheet locks all cells by default.
Configure Worksheet Protection Settings
Use Excel's built-in Protect Sheet feature to specify exactly which actions are allowed for users.
Excel allows granular control over what users can and cannot do on a protected worksheet. By specifically allowing cell selection, editing, and filtering, but leaving the sort option disabled, you can achieve the exact permissions required.
Select all the cells you want users to be able to edit. Right-click the selection, choose 'Format Cells', go to the 'Protection' tab, and uncheck the 'Locked' box. Click OK.
Select your column headers, go to the 'Data' tab on the ribbon, and click 'Filter' to turn on the dropdown arrows. This must be done before protecting the sheet.
Navigate to the 'Review' tab and click 'Protect Sheet'.
In the 'Allow all users of this worksheet to' list, check 'Select locked cells', 'Select unlocked cells', and 'Use AutoFilter'. Make sure 'Sort' remains unchecked. Enter a password if desired, and click OK.

Use Sheet Views for Co-authoring
If multiple users edit the file simultaneously in Microsoft 365, use Sheet Views to prevent one user's sorting or filtering from affecting others.
Protect and Manage Worksheets Effectively in WPS Office
WPS Office Spreadsheet provides robust worksheet protection features out of the box, allowing you to easily lock sorting while enabling filtering and cell editing. It's a lightweight, fully compatible alternative for all your spreadsheet needs.
- 1. Unlock Editing Areas: Open your workbook in WPS Spreadsheet, select editable cells, right-click to select 'Format Cells', and uncheck 'Locked' under the Protection tab.
- 2. Turn on Filter: Select your header row and click on the 'Data' tab, then choose 'AutoFilter'.
- 3. Apply Protection: Navigate to the 'Review' tab and click on 'Protect Sheet'.
- 4. Configure Sorting and Filtering: Check 'Use AutoFilter' and uncheck 'Sort' in the permissions list, input a password, then click 'OK'.

Frequently Asked Questions
Why is the AutoFilter option grayed out after protecting the sheet?
This happens if you didn't apply the filter to your headers before protecting the sheet. To fix this, unprotect the sheet (Review > Unprotect Sheet), select your data headers, go to Data > Filter to turn it on, and then protect the sheet again while allowing 'Use AutoFilter'.
Can users still sort data if they copy it to a new workbook?
Yes, worksheet protection only applies to the current worksheet. If a user selects the data, copies it, and pastes it into a new, unprotected workbook, they will be able to sort the pasted data freely.
How do I allow users to format cells but not sort?
When setting up the protection via the Review tab > Protect Sheet, simply check the 'Format cells', 'Format columns', or 'Format rows' options in the list of allowed actions, while keeping the 'Sort' option unchecked.




