Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 189
Default sorting range

hi,
I'm using the following code to sort a selected range based on the columns,
C,B and F.I don't know why the range is sorted only based on Column C?
Sub Rectangle1954_Click()
Dim myRng As Range
Set myRng = Selection.Areas(1)
With myRng
.Sort key1:=Columns("C"), order1:=xlAscending, header:=xlNo,
MatchCase:=False, Orientation:=xlTopToBottom, key2:=Columns("B"),
order1:=xlAscending, header:=xlNo, MatchCase:=False,
Orientation:=xlTopToBottom, key3:=Columns("F"), order1:=xlAscending,
header:=xlNo, MatchCase:=False, Orientation:=xlTopToBottom
End With
End Sub

any help?
thanx
 
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 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 range changes sum??? (excel) bertbarndoor Excel Worksheet Functions 4 March 3rd 06 04:31 PM
Sorting By a range of rows JSolesky Excel Discussion (Misc queries) 1 December 6th 05 06:26 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 06: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"