Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just for interest:
You could have gotten code like that by turning on the macro recorder, selecting your range and do Data=sort and specifying your parameters. Then turn off the macro recorder. -- Regards, Tom Ogilvy "slim" wrote: Hey, thanks for replying. I've solved the problem now with a handy bit of code from Microsoft! Sub SortRange() Dim MyErr As Label On Error GoTo MyErr Selection.Sort Key1:=Range("N5"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom MyErr: Select Case Err Case 0 'Everything is OK Case Else MsgBox Err.Description End Select Err.Clear End Sub Thanks for your help. -- slim ------------------------------------------------------------------------ slim's Profile: http://www.excelforum.com/member.php...o&userid=28643 View this thread: http://www.excelforum.com/showthread...hreadid=525357 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sort an array | Excel Programming | |||
sort 2D array | Excel Programming | |||
sort 2D array | Excel Programming | |||
sort an array | Excel Programming | |||
Sort an Array | Excel Programming |