G
GMet
I have copied 2 different pivot table macros to adapt to my data. I get the
same error with both.
Here is the code:
worksheets.add
ActivSheet.PivotTableWizard sourcetype:=xldatabase, _
SourceData:=Sheets("Rollup").UsedRange, _
Tabledestination:=ActiveCell, Tablename:= _
"BOEpivot", savedata:=False
With ActiveSheet.PivotTables ("BOEpivot")
.AddFields RowFields:="WBS Desc", _
columnFields:="Events", PageFields:="IPT"
.PivotFields(WBS Desc").Orientation = xlDataField
.PivotFields("Budget").function = xlsum
end with
The error is:
The Pivottable field name is not valid. To create a pivottable report, you
must use data that is organized as a list with labeled columns. If you are
changing the name of a Pivottable field, you must type a new name for the
field.
The field names are exactly as in the source data (of about 30 fields).
This is the first time using Pivot tables and I am confused.
GMet
same error with both.
Here is the code:
worksheets.add
ActivSheet.PivotTableWizard sourcetype:=xldatabase, _
SourceData:=Sheets("Rollup").UsedRange, _
Tabledestination:=ActiveCell, Tablename:= _
"BOEpivot", savedata:=False
With ActiveSheet.PivotTables ("BOEpivot")
.AddFields RowFields:="WBS Desc", _
columnFields:="Events", PageFields:="IPT"
.PivotFields(WBS Desc").Orientation = xlDataField
.PivotFields("Budget").function = xlsum
end with
The error is:
The Pivottable field name is not valid. To create a pivottable report, you
must use data that is organized as a list with labeled columns. If you are
changing the name of a Pivottable field, you must type a new name for the
field.
The field names are exactly as in the source data (of about 30 fields).
This is the first time using Pivot tables and I am confused.
GMet