I'm a newbie to VB scripting and am having trouble editing an Excel macro.

I have a single workbook with multiple worksheets.

Each worksheet has a different number of rows but each has 5 header rows and 3 "footer rows".

I want a single macro that will work on any active worksheet to sort the contents on column A for the range A6 to lastcell-3.

I've recorded a macro but it hard codes the cell values of the worksheet that was active during the record. Thus, it fails on other worksheets where the number of rows is different.

HELP!?@K#&*

Here is what I have so far:



Sub SortCol1()
'
' SortCol1 Macro
' Macro recorded 2005-02-27
'
' Keyboard Shortcut: Ctrl+Shift+A
'
Range("A1:C1").Select
ActiveCell.SpecialCells(xlLastCell).Select
Range("D25").Select
Range(Selection, Cells(1)).Select
Range("A6:D25").Select
Range("D25").Activate
Selection.Sort Key1:=Range("A6"), Order1:=xlDescending, Key2:=Range("B6") _
, Order2:=xlAscending, Key3:=Range("C6"), Order3:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("A1:C1").Select
End Sub