T
ten
Can Anyone please help me:
(I also posted this under programming, but since it's not
entirely a pårogramming issue, i post it here as well):
I have some data I want to put into an PivotTable (doing
some VBA-programming, but the issue is the same without
coding). That is ok.
However, I get a limitation for how many rows I can have:
I have now 5, but want 2 more. But when adding these
(either manually or through change in code), I get a
message telling me I have too many rows or coloumns.
Are there any way I can go past this issue?
I might add that the rows I want, are one to one to other
rows, so that I need no more sums. (Each Account has one
and only one AccountNO, Each Property has one and only one
PropertyNO).
My code follows, and I typically want to add more in
the "AddFields RowFields-section", which I want something
like:
AddFields RowFields:=Array("Property", _
"PropertyNO", "Company", "Acc.kl", "Acc.gr", _
"AccountNO", "Account"),
This is my code:
ActiveSheet.PivotTableWizard SourceType:=xlDatabase,
SourceData:= _
"'Lim inn Grunnlagsdata her!'!R1C1:R10598C27",
TableDestination:="", _
TableName:="Pivottabell1"
ActiveSheet.PivotTables("Pivottabell1").PivotFields
("PropertyNO").Subtotals = _
Array(False, False, False, False, False, False,
False, False, False, False, False, False)
ActiveSheet.PivotTables("Pivottabell1").PivotFields
("AccountNO").Subtotals = _
Array(False, False, False, False, False, False,
False, False, False, False, False, False)
ActiveSheet.PivotTables("Pivottabell1").PivotFields
("Account").Subtotals = _
Array(False, False, False, False, False, False,
False, False, False, False, False, False)
ActiveSheet.PivotTables("Pivottabell1").AddFields
RowFields:=Array("Property", _
"PropertyNO", "Acc.kl", "Acc.gr", "AccountNO"),
ColumnFields:="ColumnName", _
PageFields:="Portfolio"
With ActiveSheet.PivotTables
("Pivottabell1").PivotFields("Amount")
.Orientation = xlDataField
.Name = "Summer Amount"
.Function = xlSum
End With
Please advice! Thx!
(I also posted this under programming, but since it's not
entirely a pårogramming issue, i post it here as well):
I have some data I want to put into an PivotTable (doing
some VBA-programming, but the issue is the same without
coding). That is ok.
However, I get a limitation for how many rows I can have:
I have now 5, but want 2 more. But when adding these
(either manually or through change in code), I get a
message telling me I have too many rows or coloumns.
Are there any way I can go past this issue?
I might add that the rows I want, are one to one to other
rows, so that I need no more sums. (Each Account has one
and only one AccountNO, Each Property has one and only one
PropertyNO).
My code follows, and I typically want to add more in
the "AddFields RowFields-section", which I want something
like:
AddFields RowFields:=Array("Property", _
"PropertyNO", "Company", "Acc.kl", "Acc.gr", _
"AccountNO", "Account"),
This is my code:
ActiveSheet.PivotTableWizard SourceType:=xlDatabase,
SourceData:= _
"'Lim inn Grunnlagsdata her!'!R1C1:R10598C27",
TableDestination:="", _
TableName:="Pivottabell1"
ActiveSheet.PivotTables("Pivottabell1").PivotFields
("PropertyNO").Subtotals = _
Array(False, False, False, False, False, False,
False, False, False, False, False, False)
ActiveSheet.PivotTables("Pivottabell1").PivotFields
("AccountNO").Subtotals = _
Array(False, False, False, False, False, False,
False, False, False, False, False, False)
ActiveSheet.PivotTables("Pivottabell1").PivotFields
("Account").Subtotals = _
Array(False, False, False, False, False, False,
False, False, False, False, False, False)
ActiveSheet.PivotTables("Pivottabell1").AddFields
RowFields:=Array("Property", _
"PropertyNO", "Acc.kl", "Acc.gr", "AccountNO"),
ColumnFields:="ColumnName", _
PageFields:="Portfolio"
With ActiveSheet.PivotTables
("Pivottabell1").PivotFields("Amount")
.Orientation = xlDataField
.Name = "Summer Amount"
.Function = xlSum
End With
Please advice! Thx!