Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Neily
 
Posts: n/a
Default Pivot Table Page Field

Hi,

Does anyone know if I can interact with the (All) selection of a pivot table
page field? I would like to either take it out or change it's caption.

Neil


  #2   Report Post  
Debra Dalgleish
 
Posts: n/a
Default

You can't suppress the "All" option in the page field, or change its
caption. With programming, you could select another item if the user
selects "All".

For example:
'========================
Private Sub Worksheet_Change(ByVal Target As Range)
Dim pt As PivotTable
Dim pf As PivotField
Set pt = Me.PivotTables(1)
Set pf = pt.PivotFields("Region")

With pf
If .CurrentPage = "(All)" Then
.CurrentPage = .PivotItems(1).Name
End If
End With
End Sub
'============================

This code is stored on the worksheet's code module --
Right-click the sheet tab, and choose View Code
Paste the code where the cursor is flashing.


Neily wrote:
Hi,

Does anyone know if I can interact with the (All) selection of a pivot table
page field? I would like to either take it out or change it's caption.

Neil




--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

  #3   Report Post  
Neily
 
Posts: n/a
Default

Hi Debra,

I suspected you couldn't actually mess about with the (All) field, but this
will be really helpful,

Thanks

"Debra Dalgleish" wrote:

You can't suppress the "All" option in the page field, or change its
caption. With programming, you could select another item if the user
selects "All".

For example:
'========================
Private Sub Worksheet_Change(ByVal Target As Range)
Dim pt As PivotTable
Dim pf As PivotField
Set pt = Me.PivotTables(1)
Set pf = pt.PivotFields("Region")

With pf
If .CurrentPage = "(All)" Then
.CurrentPage = .PivotItems(1).Name
End If
End With
End Sub
'============================

This code is stored on the worksheet's code module --
Right-click the sheet tab, and choose View Code
Paste the code where the cursor is flashing.


Neily wrote:
Hi,

Does anyone know if I can interact with the (All) selection of a pivot table
page field? I would like to either take it out or change it's caption.

Neil




--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html


  #4   Report Post  
Debra Dalgleish
 
Posts: n/a
Default

You're welcome. Thanks for letting me know that it helps.

Neily wrote:
Hi Debra,

I suspected you couldn't actually mess about with the (All) field, but this
will be really helpful,

Thanks

"Debra Dalgleish" wrote:


You can't suppress the "All" option in the page field, or change its
caption. With programming, you could select another item if the user
selects "All".

For example:
'========================
Private Sub Worksheet_Change(ByVal Target As Range)
Dim pt As PivotTable
Dim pf As PivotField
Set pt = Me.PivotTables(1)
Set pf = pt.PivotFields("Region")

With pf
If .CurrentPage = "(All)" Then
.CurrentPage = .PivotItems(1).Name
End If
End With
End Sub
'============================

This code is stored on the worksheet's code module --
Right-click the sheet tab, and choose View Code
Paste the code where the cursor is flashing.


Neily wrote:

Hi,

Does anyone know if I can interact with the (All) selection of a pivot table
page field? I would like to either take it out or change it's caption.

Neil




--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html





--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

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
Using a Pivot Table Calculated Field to get a Unique Count Mike Struckman Excel Worksheet Functions 1 November 22nd 05 05:32 PM
Pivot Table Page Field Jimbola Excel Discussion (Misc queries) 0 February 6th 05 09:13 PM
Pivot Table - Filtering Page Field R. G. Ingersoll Excel Discussion (Misc queries) 1 January 29th 05 07:29 PM
Calculated Field in Pivot Table Edgar Thoemmes Excel Worksheet Functions 0 December 23rd 04 11:59 AM
How to create a calculated field formula based on Pivot Table resu dha17 Excel Discussion (Misc queries) 1 December 15th 04 05:39 AM


All times are GMT +1. The time now is 01:03 PM.

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

About Us

"It's about Microsoft Excel"