PC Review


Reply
Thread Tools Rate Thread

How do I sort a proctected worksheet

 
 
=?Utf-8?B?QXVkcmV5?=
Guest
Posts: n/a
 
      18th Jul 2006

 
Reply With Quote
 
 
 
 
Chip Pearson
Guest
Posts: n/a
 
      18th Jul 2006
Unprotect it.


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

"Audrey" <(E-Mail Removed)> wrote in message
news:1E1AC0AE-67F0-46B1-A741-(E-Mail Removed)...
>



 
Reply With Quote
 
=?Utf-8?B?QXVkcmV5?=
Guest
Posts: n/a
 
      27th Jul 2006
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" <(E-Mail Removed)> wrote in message
> news:1E1AC0AE-67F0-46B1-A741-(E-Mail Removed)...
> >

>
>
>

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      27th Jul 2006
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" <(E-Mail Removed)> wrote in message
> > news:1E1AC0AE-67F0-46B1-A741-(E-Mail Removed)...
> > >

> >
> >
> >


--

Dave Peterson
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
USB Flash write proctected! Susan Windows XP Hardware 6 10th Oct 2008 08:07 AM
Proctected cell - Lost password Tom Microsoft Excel Worksheet Functions 3 9th Sep 2008 06:07 PM
Word XP Doc Proctected, Cannot Unprotect =?Utf-8?B?c3dlZXRtYW5z?= Microsoft Word Document Management 4 17th Jan 2006 02:47 AM
Proctected My Document Folder =?Utf-8?B?QW5kcmk=?= Windows XP General 6 17th May 2005 07:51 PM
Uncollapse Grouped Rows on a Proctected worksheet Tanya Microsoft Excel Misc 1 22nd Jul 2004 02:57 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:47 PM.