I don't think it is possible but if it is please help:
[VBA]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[/VBA]
I don't think it is possible but if it is please help:
[VBA]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[/VBA]
if this isn't possible can someone tell me so?
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.
Ken Puls, CMA - Microsoft MVP (Excel)
I hate it when my computer does what I tell it to, and not what I want it to.
Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar
This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!
Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!
ken,
That is what I thought. Thank you.
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.Originally Posted by Norie
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.