ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sort a Range (https://www.excelbanter.com/excel-programming/424708-sort-range.html)

kirkm[_8_]

Sort a Range
 

I wonder if there's a quick way to do this -

In my worksheet I'd like to sort (everything in) rows 112-151 by the
value in column C.

Thanks for any help. My way would be to read it all into an array,
and sort that by element 3, then re-write the rows. But I suspect
a much easier and faster Excel method might exist.

Cheers - Kirk

curlydave

Sort a Range
 
"....... But I suspect a much easier and *faster Excel method might
exist......"

Like selecting the rows and sorting based on Column C?

Or with VBA

Rows("112:151").Sort Key1:=Range("B111"), Order1:=xlAscending,
Header:=xlNo _
, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal



kirkm[_8_]

Sort a Range
 
On Thu, 26 Feb 2009 02:28:29 -0800 (PST), CurlyDave
wrote:

"....... But I suspect a much easier and *faster Excel method might
exist......"

Like selecting the rows and sorting based on Column C?


Yes, I stumbed onto that after posting the message :)

Or with VBA

Rows("112:151").Sort Key1:=Range("B111"), Order1:=xlAscending,
Header:=xlNo _
, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal


Thanks for that too,
Cheers - Kirk


All times are GMT +1. The time now is 11:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com