ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sort - Header:=xlGuess vs Header:=xlNo (https://www.excelbanter.com/excel-programming/341839-sort-header-%3Dxlguess-vs-header-%3Dxlno.html)

mwc0914[_7_]

Sort - Header:=xlGuess vs Header:=xlNo
 

Trying to sort cells k24:p35 with no header.

The Header parameter in my Sort statement contains Header:=X|Guess and
this seems to work most times, but sometimes it does not sort properly.
If I use Header:=x|No it sorts properly all the time, but does not work
with an older version of Excel (2001 I think).

What is X|Guess doing that causes the sort to not work sometimes?

My Sort statement is:

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


--
mwc0914
------------------------------------------------------------------------
mwc0914's Profile: http://www.excelforum.com/member.php...o&userid=24130
View this thread: http://www.excelforum.com/showthread...hreadid=472966


Tom Ogilvy

Sort - Header:=xlGuess vs Header:=xlNo
 
header=xlNo

should work in all version of xl (at least from xl97 on).

--
Regards,
Tom Ogilvy

"mwc0914" wrote in
message ...

Trying to sort cells k24:p35 with no header.

The Header parameter in my Sort statement contains Header:=X|Guess and
this seems to work most times, but sometimes it does not sort properly.
If I use Header:=x|No it sorts properly all the time, but does not work
with an older version of Excel (2001 I think).

What is X|Guess doing that causes the sort to not work sometimes?

My Sort statement is:

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


--
mwc0914
------------------------------------------------------------------------
mwc0914's Profile:

http://www.excelforum.com/member.php...o&userid=24130
View this thread: http://www.excelforum.com/showthread...hreadid=472966





All times are GMT +1. The time now is 03:41 PM.

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