Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
sorting code problems
I try this code to sort my sheet but end up losing my header (which i row 1) Can anyone help me figure out why? Code ------------------- Rows("1:61775").Select Range("C1").Activate Selection.sort Key1:=Range("C1"), Order1:=xlAscending, Header:= _ xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom ------------------- -- DK ----------------------------------------------------------------------- DKY's Profile: http://www.excelforum.com/member.php...fo&userid=1451 View this thread: http://www.excelforum.com/showthread.php?threadid=26315 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
sorting code problems
Change xlGuess to xlYes
Rows("1:61775").Select Range("C1").Activate Selection.sort Key1:=Range("C1"), Order1:=xlAscending, Header:= _ xlYes, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom -- Regards, Tom Ogilvy "DKY" wrote in message ... I try this code to sort my sheet but end up losing my header (which is row 1) Can anyone help me figure out why? Code: -------------------- Rows("1:61775").Select Range("C1").Activate Selection.sort Key1:=Range("C1"), Order1:=xlAscending, Header:= _ xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom -------------------- -- DKY ------------------------------------------------------------------------ DKY's Profile: http://www.excelforum.com/member.php...o&userid=14515 View this thread: http://www.excelforum.com/showthread...hreadid=263154 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
sorting code problems
Hi,
Read the sort parameters, Header =: xlGuess. ( and check the sort parameters in Help) Excell did a wrong guess. Change it to xlYes Regards, JY "DKY" wrote in message ... I try this code to sort my sheet but end up losing my header (which is row 1) Can anyone help me figure out why? Code: -------------------- Rows("1:61775").Select Range("C1").Activate Selection.sort Key1:=Range("C1"), Order1:=xlAscending, Header:= _ xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom -------------------- -- DKY ------------------------------------------------------------------------ DKY's Profile: http://www.excelforum.com/member.php...o&userid=14515 View this thread: http://www.excelforum.com/showthread...hreadid=263154 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
sorting problems | Excel Discussion (Misc queries) | |||
Problems due to sorting | Excel Discussion (Misc queries) | |||
sorting problems | Excel Worksheet Functions | |||
Need Help with Sorting Problems | Excel Discussion (Misc queries) | |||
Problems merging an excel file due to code or file problems? | Excel Programming |