Subtotals

  • Thread starter Thread starter LC
  • Start date Start date
L

LC

Hi,

I was wondering if I can change the columns that will be
subtotaled b/c the excel that I'll working on will have
different columns and I tried everything but it still
doesnt work. This is what i have but doesnt work:

Dim text As String
text = "8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18"
Dim grp As Integer
grp = 2
ActiveCell.Range("A2").Select
Selection.subtotal GroupBy:=grp, Function:=xlSum,
TotalList:=Array(text), Replace:=False,
PageBreaks:=False, _
SummaryBelowData:=True

Please Help me
Thank you.
 
See one of your other posts.
Hi,

I was wondering if I can change the columns that will be
subtotaled b/c the excel that I'll working on will have
different columns and I tried everything but it still
doesnt work. This is what i have but doesnt work:

Dim text As String
text = "8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18"
Dim grp As Integer
grp = 2
ActiveCell.Range("A2").Select
Selection.subtotal GroupBy:=grp, Function:=xlSum,
TotalList:=Array(text), Replace:=False,
PageBreaks:=False, _
SummaryBelowData:=True

Please Help me
Thank you.
 
Back
Top