fmw5162022
New Member
- Joined
- May 16, 2022
- Messages
- 1
- Office Version
- 365
- Platform
- Windows
- MacOS
Hello,
Currently, I have a macro for sorting and subtotaling a list of customers and their daily total sales. Those work as expected, providing the results I desire.
I need to insert a blank row AFTER each subtotal, and am unable to accomplish this.
Below are my Sort and Subtotal macros:
Thanking you very much in advance for your help!!
Currently, I have a macro for sorting and subtotaling a list of customers and their daily total sales. Those work as expected, providing the results I desire.
I need to insert a blank row AFTER each subtotal, and am unable to accomplish this.
Below are my Sort and Subtotal macros:
VBA Code:
Sub SortSalesDetail()
' SortSalesDetail Macro
' Sort Sales Detail
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
If ws.Name Like "####-##-##_Tickets" Then
ws.[A1].CurrentRegion.Sort key1:=ws.[C1], Header:=xlYes, Key2:=ws.[E1], Header:=xlYes
ws.Name = ws.Name & "_s"
End If
Next
ActiveWindow.SmallScroll Down:=-63
End Sub
VBA Code:
Sub Subtotal()
'
' Subtotal Macro
'
Selection.Subtotal GroupBy:=3, Function:=xlSum, TotalList:=Array(9), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
End Sub
Thanking you very much in advance for your help!!