Ayuda con Tabla Dinamica

UliCs

New Member
Joined
Oct 20, 2009
Messages
36
Hola Amigos ayudenme por favor con este problema.
sucede que tengo una macro para hacer un reporte, solamente que los encabezados del reporte los tengo que cambiar constantemente, es decir los encabezados de los datos son fechas por ejemplo en el codigo de abajo es 01/05/2009 pero cada que corro la macro este encabezado cambia

ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:="Hoja1!R3C3:R11C9"). _
CreatePivotTable TableDestination:="", TableName:="TD1"
ActiveSheet.PivotTableWizard TableDestination:=ActiveSheet.Cells(3, 1)

ActiveSheet.PivotTables("TD1").AddFields RowFields:=Array("Companies", "Usesrs", "Datos")
With ActiveSheet.PivotTables("TD1").PivotFields("01/05/09")
.Orientation = xlDataField
.Position = 1
End With
With ActiveSheet.PivotTables("TD1").PivotFields("08/05/09")
.Orientation = xlDataField
.Position = 2
End With
With ActiveSheet.PivotTables("TD1").PivotFields("15/05/09")
.Orientation = xlDataField
.Position = 3
End With
With ActiveSheet.PivotTables("TD1").DataPivotField
.Orientation = xlColumnField
.Position = 1
End With

Ayudenme Please. Thks ;)
<div_prefs id="div_prefs"></div_prefs>
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,223,966
Messages
6,175,661
Members
452,666
Latest member
AllexDee

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top