ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Subtotal formats (https://www.excelbanter.com/excel-programming/272731-subtotal-formats.html)

LC[_3_]

Subtotal formats
 
Hi

what I have is this:

*num is a variable for where the column of the array
should start..

Dim varr()
Dim rng As Range, i As Long
Set rng = Range("IV1").End(xlToLeft)
ReDim varr(1 To rng.Column - num)

For i = 1 To rng.Column - num
varr(i) = i + num
Next
ActiveCell.Range("A3").Select
Selection.subtotal GroupBy:=groups, Function:=xlSum, _
TotalList:=varr, Replace:=False, PageBreaks:=False, _
SummaryBelowData:=True

Questions: Can I write the above subtotal function in a
different format? and Can I disable the grand total
summary from the subtotal function
If you could help me with that, that would be wonderful.

Thank you.


All times are GMT +1. The time now is 03:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com