Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I calculate the total of the lowest 10 numbers in an array Leroy 694 Excel Discussion (Misc queries) 7 July 9th 07 02:54 PM
Excel 2002 : Any single button to get sub total and grand total ? Mr. Low Excel Discussion (Misc queries) 2 May 22nd 07 08:46 AM
Grand total based on conditions within an array [email protected] Excel Discussion (Misc queries) 2 June 26th 06 09:00 PM
Running total array? uw805 Excel Worksheet Functions 1 June 9th 06 04:18 AM
Total an array Joe P. Excel Worksheet Functions 3 January 18th 06 06:02 PM


All times are GMT +1. The time now is 10:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"