Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
sub total array
Selection.subtotal GroupBy:=lngcontrolcol1, Function:=xlSum,
TotalList:=Array(13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25), Replace:=True, PageBreaks:=False, _ SummaryBelowData:=True how can i change the array part so that i can dynamically specify which coulumn i wan the subtotal to calculate. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
sub total array
I'm not sure how you know which fields to sum, but you can build an array with
those field numbers: dim myArr as variant myArr = array(3,6,17) ....., totallist:=myarr, ... violet wrote: Selection.subtotal GroupBy:=lngcontrolcol1, Function:=xlSum, TotalList:=Array(13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25), Replace:=True, PageBreaks:=False, _ SummaryBelowData:=True how can i change the array part so that i can dynamically specify which coulumn i wan the subtotal to calculate. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how do I calculate the total of the lowest 10 numbers in an array | Excel Discussion (Misc queries) | |||
Excel 2002 : Any single button to get sub total and grand total ? | Excel Discussion (Misc queries) | |||
Grand total based on conditions within an array | Excel Discussion (Misc queries) | |||
Running total array? | Excel Worksheet Functions | |||
Total an array | Excel Worksheet Functions |