What if you just copied the formatted cells to somewhere else and put
then back after sorting, like below.
Sean
"Just press the off switch, and go to sleep!"
'------------------------------------------------------
'------------------------------------------------------
Sub sort_keep_format()
Dim rangeSORT As Range, sheetTEMP As Worksheet
Set rangeSORT = Rows("3:22")
' create a worksheet to store a copy of the formats
Set sheetTEMP = rangeSORT.Worksheet.Parent.Sheets.Add
rangeSORT.Copy
sheetTEMP.Cells(1, 1).PasteSpecial Paste:=xlFormats
' set these parameters as per your wishes
rangeSORT.Sort Key1:=Range(first), Order1:=ord, Header:=xlNo,
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
' put back the original formats
sheetTEMP.UsedRange.Copy
rangeSORT.PasteSpecial Paste:=xlPasteFormats
' remove the temporary worksheet
Application.DisplayAlerts = False
sheetTEMP.Delete
Application.DisplayAlerts = True
' it's good to be tidy
Set sheetTEMP = Nothing
Set rangeSORT = Nothing
End Sub
'------------------------------------------------------
'------------------------------------------------------
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!