excel pivot tables

  • Thread starter Thread starter tom
  • Start date Start date
T

tom

I posted this same query yesterday, but nobody had an
answer. not sure how far you guyts look back so i'll try
again!

help please


Excel 2000

I use a pivot table for a report that has to be sent out
in many different formats so I would like to record a
macro to do this for me.

Part of the formatting that has to be done is changing the
page, row and column pivot table fields. I have tried
recording a macro, but excel records the cell reference of
the pivot table field that i am moving. Obviously the
field are not aways ging to be in the same place.

Does anyone know the code i need to use that will select a
pivot table filed by its name and then move it, rahter
than by its cell reference.

any help woukld be much appreciated
 
Tom,

For example:

With ActiveSheet.PivotTables("PivotTable1")
With .PivotFields("QUARTER")
.Orientation = xlRowField
.Position = 1
End With
End With

HTH,
Bernie
Excel MVP
 
Back
Top