Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Excel Pivot Table link page field to spreadsheet cell

Is it possible to link the page field in a pivot table to a cell in
the spreadsheet?

I want to select a value from a validation list in cell, c3 on sheet1
and have this value be the page field value.

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,979
Default Excel Pivot Table link page field to spreadsheet cell

You could use event code on the sheet that contains the data validation
dropdown. For example, if the dropdown is in cell C2, and the pivot
table is on a sheet named Sales Pivot, right-click on the sheet tab for
the data validation sheet and add the following code:

'========================
Private Sub Worksheet_Change(ByVal Target As Range)
Dim pt As PivotTable
Dim pf As PivotField
Dim pi As PivotItem
Set pt = Worksheets("Sales Pivot").PivotTables(1)
Set pf = pt.PageFields("Region")

If Target.Address = "$C$2" Then

Application.EnableEvents = False
For Each pi In pf.PivotItems
If LCase(pi.Value) = LCase(Target.Value) Then
pf.CurrentPage = pi.Value
Exit For
End If
Next pi
Application.EnableEvents = True

End If

End Sub
'=====================

excel misc wrote:
Is it possible to link the page field in a pivot table to a cell in
the spreadsheet?

I want to select a value from a validation list in cell, c3 on sheet1
and have this value be the page field value.

Thanks



--
Debra Dalgleish
Contextures
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
Display the source for a pivot table page field Gary Brown Excel Worksheet Functions 4 November 8th 06 03:02 PM
Pivot Table Page field link to cell Santhosh Mani Excel Worksheet Functions 0 May 12th 05 05:58 AM
Pivot Table Page Field Neily Excel Discussion (Misc queries) 3 February 24th 05 01:23 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


All times are GMT +1. The time now is 08:28 PM.

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"