PDA

View Full Version : Solved: Anybody know how to speed up subtotals?



Djblois
05-03-2007, 07:06 AM
I don't think it is possible but if it is please help:

Selection.Subtotal GroupBy:=3, Function:=xlSum, TotalList:=Array(4, 5, 6, 7, _
8, 9, 11, 12, 13, 14, 18), Replace:=False, PageBreaks:=False, SummaryBelowData:= _
True

Djblois
05-03-2007, 11:07 AM
if this isn't possible can someone tell me so?

Ken Puls
05-05-2007, 03:30 PM
Daniel,

Generaly the fastest way to do something is to leverage the built in objects in the object model, of which subtotal is one. I'd suggest that if your subtotal code is going slowly, then you're not going to be able to speed it up much.

You could try flipping calc mode to manual, then apply your subtotals then switch back to Auto, and that might help.

Djblois
05-05-2007, 03:33 PM
ken,

That is what I thought. Thank you.

Norie
05-06-2007, 08:52 AM
You could try not using Selection.:)

Bob Phillips
05-06-2007, 08:59 AM
You could try not using Selection.:) That will only help if the code does the selection. If the selection is done in Excel, then it is just a range object like any other.

Norie
05-06-2007, 09:23 AM
Well there's no way to tell how the selection is done without either seeing the rest of the code and/or getting more information from the OP.:)