#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default sort range

I'm sorry if this is a repost but I asked this question last week and now I
can not find the question. It was odd because the same day I had seen a
response but I look today and nothing, not even the question.

I am using the following code in a Macro to sort my spreadsheet ...

Range("A1:U700").Sort Key1:=Range("A2"), Order1:=xlDescending, Key2:=Range _
("J2"), Order2:=xlAscending, Key3:=Range("K2"), Order3:=xlAscending, _
Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:= _
xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, _
DataOption3:=xlSortNormal

I would now like to have an additional sort. If the value in cell A is "d"
then I want to sort that range by column I. I hope that makes sense.




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
Sort a Range kirkm[_8_] Excel Programming 2 February 26th 09 12:15 PM
Sort Worksheet Range from another worksheet range, Excel 2000 & 2003 jfcby[_2_] Excel Programming 1 August 21st 07 02:55 AM
Search range and sort another range John[_130_] Excel Programming 0 May 11th 07 12:52 AM
formula to sort a range so that it matches the exact rows of a column that is outside that range? steveo Excel Discussion (Misc queries) 1 June 18th 06 02:05 AM
Sort range changes during sort coffedrinker2003 Excel Discussion (Misc queries) 1 May 24th 05 11:53 PM


All times are GMT +1. The time now is 07:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"