Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 53
Default Sorting a Protected Worksheet

Does anyone know how to allow sorting in a protected worksheet that has
locked cells?
Thanks!
--
S Berk
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Sorting a Protected Worksheet

In versions 2002 and greater, if the range of cells to sort is unlocked prior to
adding sheet protection you can sort just that unlocked range.

Elsewise you will have to use VBA to unprotect the sheet, do the sort then
re-protect.

Sub Sort_Protected_Sheet()
ActiveSheet.Unprotect Password:="justme"
Columns("A:E").Select
Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
ActiveSheet.Protect Password:="justme"
End Sub


Gord Dibben MS Excel MVP

On Mon, 24 Sep 2007 14:00:02 -0700, Shannon
wrote:

Does anyone know how to allow sorting in a protected worksheet that has
locked cells?
Thanks!


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting Protected Worksheet Marge Excel Worksheet Functions 4 April 26th 07 04:56 PM
Sorting Protected Worksheet Vonner Excel Discussion (Misc queries) 1 July 16th 05 03:23 PM
Sorting on a protected worksheet Sue Excel Discussion (Misc queries) 6 June 12th 05 09:26 AM
Sorting protected worksheet Phyllis Excel Discussion (Misc queries) 3 December 15th 04 11:27 PM


All times are GMT +1. The time now is 02:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"