1) I'd recommend not using CTRL a for a shortcut. That's used for something
else
2) What exactly do you want to sort and how do you want to start?
I did a little bit of cleanup here and this assumes that the activesheet is
smith when it was recorded. I'd make more changes, but that's for someone
else.
Option Explicit
Sub Macro1()
'
' Macro1 Macro
'
Dim aWB As Excel.Workbook
Dim aWS As Excel.Worksheet
Set aWB = ActiveWorkbook
Set aWS = ActiveSheet 'Assume activesheet name is "smith"
aWS.Range(Selection, Selection.End(xlToRight)).Select
ActiveCell.Range("A1:AD1").Select
aWS.Range(Selection, Selection.End(xlDown)).Select
ActiveCell.Range("A1:AD30").Select
aWS.Sort.SortFields.Clear
aWS.Sort.SortFields.Add Key:=ActiveCell. _
Offset(0, 24).Range("A1:A24"), _
SortOn:=xlSortOnValues, _
Order:=xlDescending, _
DataOption:=xlSortNormal
aWS.Sort.SortFields.Add _
Key:=ActiveCell.Offset(0, 3).Range("A1:A24"), _
SortOn:=xlSortOnValues, _
Order:=xlAscending, _
DataOption:=xlSortNormal
aWS.Sort.SortFields.Add _
Key:=ActiveCell.Offset(0, 6).Range("A1:A24"), _
SortOn:=xlSortOnValues, _
Order:=xlAscending, _
DataOption:=xlSortNormal
With aWS.Sort
.SetRange ActiveCell.Offset(-1, 0).Range("A1:AD25")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Selection.Subtotal _
GroupBy:=25, _
Function:=xlSum, _
TotalList:=Array(11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24), _
Replace:=True, _
PageBreaks:=False, _
SummaryBelowData:=True
Selection.Subtotal _
GroupBy:=4, _
Function:=xlSum, _
TotalList:=Array(11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 24), _
Replace:=False, _
PageBreaks:=False, _
SummaryBelowData:=True
End Sub
HTH,
Barb Reinhardt