CausticOne
New Member
- Joined
- Sep 9, 2011
- Messages
- 2
I've got a sheet with about 1000 rows and I am performing the following function on it
Problem is it is taking a long, long time to actually complete. Is there a quicker way to do the same thing? I've tried inserting screenupdating=false and calculation=manual comments to speed things up, but gains are minimal. I need something a bit more fundamental.
Thanks!
Code:
Sub createSubtotals()
Dim subtotal_groupby As Variant, subtotal_columns As Variant, format_subtotal_pagebreak As Variant
format_subtotal_pagebreak = True
subtotal_groupby = 2
subtotal_columns = Array(6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
With Sheets(1)
.Cells.Subtotal GroupBy:=subtotal_groupby, Function:=xlSum, TotalList:=subtotal_columns, _
Replace:=True, PageBreaks:=format_subtotal_pagebreak, SummaryBelowData:=True
.Outline.ShowLevels rowLevels:=2
.Cells.SpecialCells(xlCellTypeVisible).Font.Bold = True
Outline.ShowLevels rowLevels:=3
End With
End Sub
Problem is it is taking a long, long time to actually complete. Is there a quicker way to do the same thing? I've tried inserting screenupdating=false and calculation=manual comments to speed things up, but gains are minimal. I need something a bit more fundamental.
Thanks!