Subtotals

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.
 
D

Dave Peterson

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top