Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default sort problem with first row

I am using the following code to sort first one column, then another:

Selection.Sort Key1:=Range("B1"), Order1:=xlAscending,
Key2:=Range("A1") _
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal,
DataOption2 _
:=xlSortNormal

however, the first row sometimes does not get sorted. How can I make
sure the first row gets included in the sort?

Thanks.

Smokii

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default sort problem with first row

Hi SmokiBear,

Try changing:

Header:=xlGuess

to:

Header:=xlNo

---
Regards,
Norman



wrote in message
oups.com...
I am using the following code to sort first one column, then another:

Selection.Sort Key1:=Range("B1"), Order1:=xlAscending,
Key2:=Range("A1") _
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal,
DataOption2 _
:=xlSortNormal

however, the first row sometimes does not get sorted. How can I make
sure the first row gets included in the sort?

Thanks.

Smokii



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 Problem Abdul Shakeel Excel Discussion (Misc queries) 0 February 7th 10 12:22 PM
VBA Sort Problem Tony Excel Discussion (Misc queries) 2 November 18th 09 08:44 PM
Sort problem - help! Golfinray Excel Discussion (Misc queries) 3 November 14th 07 03:46 PM
Sort problem spfas Excel Discussion (Misc queries) 2 December 21st 06 08:25 PM
Sort Problem andyp161 Excel Worksheet Functions 1 September 5th 05 12:19 PM


All times are GMT +1. The time now is 07:42 AM.

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"