Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Jimmy Hawkins   on Feb 11 In MS Office Category.

  
Question Answered By: Ethan Evans   on Feb 11

Here is the code:

Selection.Subtotal GroupBy:=CInt(atGby), Function:=xlSum,
TotalList:=Array(aiSub(1), _
aiSub(2), aiSub(3), aiSub(4), aiSub(5), aiSub(6), aiSub(7), aiSub(8),
aiSub(9), aiSub(10), _
aiSub(11), aiSub(12), aiSub(13), aiSub(14)), Replace:=abReplace,
PageBreaks:=abPageBreak, SummaryBelowData:=abSummary

Where aiSub() is an Array interger type, and atGby for group by like for 1st
level 1, 2nd Level 2 and so on.

Recently I've discovred if i pass TotalList:= Array(17,18,19,....) it works
perfectly but using aiSub() array element, giving me wrong  position.

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Multilevel subtotals are in the wrong position Or get search suggestion and latest updates.


Tagged: