Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 19
Default How do I sort a proctected worksheet


  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 7,247
Default How do I sort a proctected worksheet

Unprotect it.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"Audrey" wrote in message
...



  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 19
Default How do I sort a proctected worksheet

That is a given, but I have columns that I don't want sorted.

I have locked those columns in hopes they would not sort and the others would.

Any suggestions?

Thanks for the help.

"Chip Pearson" wrote:

Unprotect it.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"Audrey" wrote in message
...




  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 35,218
Default How do I sort a proctected worksheet

Be specific about the range to sort--exclude the columns that should not be
sorted from the range to be sorted.

The range to sort must be contiguous, though.

dim wks as worksheet
dim rng as range
set wks = worksheets("Protected")
with wks
.unprotect password:="Hi"
set rng = .range("d3:g" & .cells(.rows.count,"D").end(xlup).row)

with rng
.sort key1:=.columns(3), order1:=xlascending, header:=true
end with
.protect password:="Hi"
end with

===
Untested and uncompiled--watch for typos.

I sorted D3:G (lastrow in column D). and avoided all the other cells.


Audrey wrote:

That is a given, but I have columns that I don't want sorted.

I have locked those columns in hopes they would not sort and the others would.

Any suggestions?

Thanks for the help.

"Chip Pearson" wrote:

Unprotect it.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"Audrey" wrote in message
...





--

Dave Peterson
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
how do i sort a complete worksheet by sorting columns Martyn Excel Worksheet Functions 4 February 22nd 08 12:11 AM
sorting data on protected worksheet Sue Excel Discussion (Misc queries) 20 November 7th 06 07:31 PM
sort worksheet without affecting workbook Barry Excel Worksheet Functions 3 November 2nd 05 10:06 PM
Sort Columns in Protected Worksheet, etc. EDSTAFF Excel Worksheet Functions 0 October 26th 05 12:09 AM
Search/Match between 2 x separate Worksheets and populate result in third worksheet Alan Bartley Excel Discussion (Misc queries) 1 April 11th 05 05:21 AM


All times are GMT +1. The time now is 07:46 AM.

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"