View Single Post
  #4   Report Post  
JulieD
 
Posts: n/a
Default

oops the _ was supposed to be on the same lines as the xlYes,

--
Cheers
JulieD
check out www.hcts.net.au/tipsandtricks.htm
....well i'm working on it anyway
"JulieD" wrote in message
...
Hi Sam

something along these lines

sub sortsome()

Rows("1:5").Sort Key1:=Range("a2"), Order1:=xlAscending, Header:=xlYes,
_
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

End sub

where you have a header row (if not, change Header:=xlYes to Header:=xlNo
and A2 to A1) and you want to sort on the value in column A, if not,
change the A to whatever column you want to sort on

--
Cheers
JulieD
check out www.hcts.net.au/tipsandtricks.htm
...well i'm working on it anyway
"Sam" wrote in message
oups.com...
Hi,

I would like to create a macros that will sort out the first 5 rows of
my spreadsheet only. The reason for that is that in the middle of my
spreadsheet i have another group of cells that represent a table and I
don't want that one to be sorted.

How can i do that ?

Thx