Hi all i needed some help with the macro i am using which subtotal workbook & certain columns.. but what i want to be able to do is have a cummulative total instead of subtotals would that be possible.. regards
Public Sub InstallSubtotals()
Dim ws As Worksheet
Application.DisplayAlerts = False
Range("A3").Select
For Each ws In ActiveWorkbook.Worksheets
If IsNumeric(ws.Name) Then
With ws
.UsedRange.RemoveSubtotal
With .Range(.Cells(2, "C"), .Cells(.Rows.Count, "C").End(xlUp).Offset(, 24))
.Subtotal GroupBy:=2, Function:=xlSum, _
TotalList:=Array(7, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
End With
.Outline.ShowLevels RowLevels:=2
On Error Resume Next
With .Cells(.Rows.Count, "D").End(xlUp).Resize(, 24)
.SpecialCells(xlCellTypeBlanks).EntireColumn.Hidden = True
.SpecialCells(xlCellTypeVisible).Borders(xlEdgeTop).Weight = xlThin
End With
On Error GoTo 0
With .Range(.Cells(4, "D"), .Cells(.Rows.Count, "D").End(xlUp).Offset(, 23)).SpecialCells(xlCellTypeVisible)
.Font.Bold = True
.Borders(xlEdgeTop).Weight = xlThin
End With
.Columns("D:AA").Hidden = False
End With
End If
Bookmarks