Results 1 to 6 of 6

cumulative addition macro edit

Threaded View

tek9step cumulative addition macro edit 09-30-2010, 05:40 AM
romperstomper Re: cumulative addition macro... 09-30-2010, 06:02 AM
tek9step Re: cumulative addition macro... 09-30-2010, 06:15 AM
tek9step Re: cumulative addition macro... 09-30-2010, 06:27 AM
romperstomper Re: cumulative addition macro... 09-30-2010, 06:45 AM
tek9step Re: cumulative addition macro... 09-30-2010, 06:54 AM
  1. #1
    Valued Forum Contributor tek9step's Avatar
    Join Date
    05-27-2009
    Location
    London, England
    MS-Off Ver
    MS 365
    Posts
    395

    cumulative addition macro edit

    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
    Attached Files Attached Files
    Last edited by tek9step; 09-30-2010 at 06:55 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1