1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| Sub Macro5()
'
' Macro5 Macro
'
'
Range("A1:A2").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Sheets.Add
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDa tabase, SourceData:= _
"Feuil1 (2)!A1:C6", Version:=xlPivotTableVersion12).CreatePivotTable _
TableDestination:="Feuil12!A1:C6", TableName:="Tableau croisé dynamique4", _
DefaultVersion:=xlPivotTableVersion13
Sheets("Feuil12").Select
Cells(3, 1).Select
With ActiveSheet.PivotTables("Tableau croisé dynamique4").PivotFields("Base")
.Orientation = xlColumnField
.Position = 1
End With
With ActiveSheet.PivotTables("Tableau croisé dynamique4").PivotFields("Numero")
.Orientation = xlRowField
.Position = 1
End With
With ActiveSheet.PivotTables("Tableau croisé dynamique4").PivotFields( _
"Calificacion")
.Orientation = xlRowField
.Position = 2
End With
End Sub |
Partager