ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   strange problem subtotal (https://www.excelbanter.com/excel-programming/326970-strange-problem-subtotal.html)

hans[_4_]

strange problem subtotal
 
I use the following code:
Selection.Subtotal GroupBy:=7, Function:=xlSum, TotalList:=Array(4, 5), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
Selection.Subtotal GroupBy:=8, Function:=xlSum, TotalList:=Array(4, 5),
_
Replace:=False, PageBreaks:=False, SummaryBelowData:=True

Collum 7 cantains the name of the persons
Collum 8 contains the tpe of expences they make

This works correct for the first person
It gifs the subtotal of the last expenses type and then the total of the
person of all expenses

For all later persons is goes wrong
Now it gifs (after the last expense)
The total of all expenses of this person
and on the next line it shows the total of last expenses type
(It is swapt)

What is going wrong?

Greetings Hans

PS i use excel 2003



Fredrik Wahlgren

strange problem subtotal
 

"hans" wrote in message
...
I use the following code:
Selection.Subtotal GroupBy:=7, Function:=xlSum, TotalList:=Array(4, 5),

_
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
Selection.Subtotal GroupBy:=8, Function:=xlSum, TotalList:=Array(4,

5),
_
Replace:=False, PageBreaks:=False, SummaryBelowData:=True

Collum 7 cantains the name of the persons
Collum 8 contains the tpe of expences they make

This works correct for the first person
It gifs the subtotal of the last expenses type and then the total of the
person of all expenses

For all later persons is goes wrong
Now it gifs (after the last expense)
The total of all expenses of this person
and on the next line it shows the total of last expenses type
(It is swapt)

What is going wrong?

Greetings Hans

PS i use excel 2003



I think this article will help
http://support.microsoft.com/kb/831824

/Fredrik




All times are GMT +1. The time now is 06:14 AM.

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