LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 586
Default Sorting UsedRange of a Worksheet

How can I sort only the UsedRange of each Worksheet in a workbook? This is
what I have so far and it will not let me.

Sub Sort ()

For Each wks In Worksheets
wks.UsedRange.Sort Key1:=Range("L3"), Order1:=xlAscending, _
Key2:=Range("A3"), Order2:=xlAscending,
Header:=xlGuess
Next wks

End Sub
 
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
VBA Conditional Formatting to UsedRange on Worksheet RyanH Excel Programming 2 January 13th 08 07:52 AM
Redefine UsedRange property of Worksheet Object ExcelMonkey Excel Programming 3 December 20th 07 09:45 PM
Saving worksheet as CSV with correct usedrange... Mike Iacovou Excel Programming 1 November 14th 07 03:24 AM
Why is worksheet.usedrange empty? Sara Excel Worksheet Functions 2 August 24th 07 03:38 PM
Redefining the UsedRange of a Worksheet ExcelMonkey[_189_] Excel Programming 1 February 13th 05 06:34 PM


All times are GMT +1. The time now is 05:53 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"