Error creando tabla pivote macro - ayudda porfavor
Excel 2010 - Error generando tabla pivote con grabadora de macros
Genero la tabla y me da este erro podria alguien por favor
Este es el codigo siempre me genera una nueva tabla
he tratado quitando
TableDestination:=""
sheets.Add
Cells(3, 1).Select
y siempre tengo el mismo error
Sub Macro1()
'
' Macro1 Macro
'
'
Range("D17").Select
Selection.End(xlUp).Select
Selection.End(xlToLeft).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Sheets.Add
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Purchase Order Advanced Fin...!R1C1:R407C11", Version:=xlPivotTableVersion14 _
).CreatePivotTable TableDestination:="Sheet2!R3C1", TableName:= _
"PivotTable2", DefaultVersion:=xlPivotTableVersion14
Sheets("Sheet2").Select
Cells(3, 1).Select
ActiveWorkbook.ShowPivotTableFieldList = True
With ActiveSheet.PivotTables("PivotTable2").PivotFields("Scheduled By")
.Orientation = xlRowField
.Position = 1
End With
ActiveSheet.PivotTables("PivotTable2").AddDataField ActiveSheet.PivotTables( _
"PivotTable2").PivotFields("Scheduled By"), "Count of Scheduled By", xlCount
Sheets("Sheet2").Select
Sheets("Sheet2").Move After:=Sheets(2)
End Sub
Genero la tabla y me da este erro podria alguien por favor
Este es el codigo siempre me genera una nueva tabla
he tratado quitando
TableDestination:=""
sheets.Add
Cells(3, 1).Select
y siempre tengo el mismo error
Sub Macro1()
'
' Macro1 Macro
'
'
Range("D17").Select
Selection.End(xlUp).Select
Selection.End(xlToLeft).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Sheets.Add
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Purchase Order Advanced Fin...!R1C1:R407C11", Version:=xlPivotTableVersion14 _
).CreatePivotTable TableDestination:="Sheet2!R3C1", TableName:= _
"PivotTable2", DefaultVersion:=xlPivotTableVersion14
Sheets("Sheet2").Select
Cells(3, 1).Select
ActiveWorkbook.ShowPivotTableFieldList = True
With ActiveSheet.PivotTables("PivotTable2").PivotFields("Scheduled By")
.Orientation = xlRowField
.Position = 1
End With
ActiveSheet.PivotTables("PivotTable2").AddDataField ActiveSheet.PivotTables( _
"PivotTable2").PivotFields("Scheduled By"), "Count of Scheduled By", xlCount
Sheets("Sheet2").Select
Sheets("Sheet2").Move After:=Sheets(2)
End Sub
1 respuesta
Respuesta de WILLCOSS
1