allow custom sort on protected sheets

rjmdc

Well-known Member
Joined
Apr 29, 2020
Messages
673
Office Version
  1. 365
Platform
  1. Windows
i need to enable the "custom sort" option on a protected sheet that will allow both locked and unlocked cells to be sorted
how can i do that?
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
I'm afraid that you cant. You can only sort unlocked cells.
 
Upvote 0
what macro can i add to allow custom sort or impossible?
 
Upvote 0
You can do it via code as long as the sort columns & criteria are always the same.
 
Upvote 0
If you are trying to do that without VBA you need to combine:
1. Lock or unlock wanted cells
2. Use "Allow user to edit range" in the protection
3. Finally, when you protecting sheet select only this checkboxes:
-Select unlocked cells
-Sort
-Use AutoFilter
 
Upvote 0
that doesnt work for custom sort
vba wont work bcecause custom sort is different sort columns and parameters each time
 
Upvote 0
In the custom sort panel, check "My Data has headers".
If the filter is applayd in the header this checkbox automaticly become disabled (Be careful).
Try to include headers in sorting range. This may cause problem if it's not included.

1. Lock or unlock wanted cells
2. Use "Allow user to edit range" in the protection. Include header in the range.
3. Finally, when you protecting sheet select only this checkboxes:
-Select locked cells
-Select unlocked cells
-Sort
-Use AutoFilter
 
Upvote 0
Ha, ha, ha. Now I see the point. Yes Fluff, you are right.
I don't see the way to do that without VBA.
I didn't know that option "Allow user to edit range" cancels locked cells property.
 
Upvote 0

Forum statistics

Threads
1,215,546
Messages
6,125,459
Members
449,228
Latest member
moaz_cma

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top