Eek: I just recorded this macro in a matter of seconds. It takes your worksheet and copies it to a different name. Then it grabs the date column (in this instance, I used column A), and formats it to show only the month, then it sorts the column, runs subtotals on the amount column, and goes to the subtotals view (#2) as I explained previously. I've assigned it a shortcut key of Ctrl-Shift-G (for "go").
Hope it helps:
Sub EekbatMacro()
'
' EekbatMacro Macro
' Macro recorded 04/08/2002 by Dreamboat
'
' Keyboard Shortcut: Ctrl+Shift+G
'
Sheets("OldSheetName").Select
Sheets("OldSheetName").Copy Before:=Sheets(1)
Sheets("OldSheetName (2)").Select
Sheets("OldSheetName (2)").Name = "NewSheetName"
Columns("A:A").Select
Selection.NumberFormat = "mmmm"
Range("A1").Select
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(2), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
ActiveSheet.Outline.ShowLevels RowLevels:=2
Columns("A:A").ColumnWidth = 19
End Sub
Oh yeah. Somebody can probably shorten the code. And I also widened column A so the month names could be completely seen.
_________________
TheWordExpert
This message was edited by Dreamboat on 2002-04-07 21:32