SHG,
I made the earlier one up, as the situation of several ranges is actually at work and I'm at home.
I discovered the 2007 problem in the macro below. I must have recorded it when there were 240 records and it was only sorting 240 rows though I had inserted about 50 more - I've solved it for this particular worksheet by making the range far larger than I'll ever need - a quick (ugly) fix for this one.
I do have other situations where the range needs to be flexible and would like to know why 2007 is causing probs with this.
Thanks in anticipation!
Bungaree
Application.Goto Reference:="sort_stocklist"
ActiveWorkbook.Worksheets("Prospects").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Prospects").Sort.SortFields.Add Key:=Range( _
"i4:i2473"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:= _
xlSortNormal
ActiveWorkbook.Worksheets("Prospects").Sort.SortFields.Add Key:=Range( _
"a4:a2000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("Prospects").Sort
.SetRange Range("A3:N2000")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("A1").Select
End Sub
Bookmarks