Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 38
Default Data Fields in Pivot Table

I'm trying to write a macro that will clear all fields in my pivot table
including the data fields. I have the following:

On Error Resume Next
Dim pt As PivotTable
Dim pf As PivotField

Sheets(4).PivotTables("PivotTable2").ClearAllFilte rs
Set pt = Sheets(4).PivotTables(2)
With pt
For Each pf In .VisibleFields
pf.Orientation = xlHidden
Next pf
End With

The macro above clears all fields except the data fields. Any ideas for what
I could add to the macro to make it also clear the data fields?

Thanks.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
data as a percetage of row fields in pivot table Eqa Excel Discussion (Misc queries) 0 May 7th 08 06:44 AM
Drag multiple fields into data of pivot table maplesugarsnow Excel Worksheet Functions 0 July 18th 07 04:18 PM
how do i create pivot table from data fields containing forumulas Pam Deshazier, SRHS Excel Worksheet Functions 1 June 21st 06 11:03 PM
Manipulating Pivot Table Data Fields Jay Charts and Charting in Excel 1 November 1st 05 03:48 AM


All times are GMT +1. The time now is 12:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"