LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default Sorting Range Help

Oops

That's what comes of trying to be clever and not testing...sorry! Thanks
for bailing me out Chip ;-)

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"Chip Pearson" wrote in message
...
The line of code
Range("B12:" & lLastRow).Select
should be
Range("B12:M" & lLastRow).Select


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


"HelpMe " wrote in message
...
Thanks for the help but I am getting an error and not sure how

to solve
it! It Says *Method 'Range' of object '_Global'

failed*.
Here is the code I am using.

Sub Sorty()
Dim lLastRow As Long
lLastRow = Range("M65536").End(xlUp).Row
Range("B12:" & lLastRow).Select
Selection.Sort Key1:=Range("D12"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub

Thanks for any help!


---
Message posted from http://www.ExcelForum.com/







 
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 range Jase Excel Discussion (Misc queries) 1 September 30th 08 06:42 PM
sorting range peyman Excel Discussion (Misc queries) 5 October 27th 07 10:29 PM
Sorting by range planetdust New Users to Excel 3 October 21st 07 01:03 AM
Sorting a Range cmm Excel Discussion (Misc queries) 1 June 30th 06 01:35 PM
sorting a range cjsmith22 Excel Discussion (Misc queries) 2 November 13th 05 11:19 PM


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