PC Review


Reply
Thread Tools Rate Thread

Data validation to control a pivot table field

 
 
=?Utf-8?B?RkE=?=
Guest
Posts: n/a
 
      30th Mar 2007
I have the following VBA. I use it to change a Pivot table with a data
validation cell. The problem that I have is that when the pivot table should
show "All" it will overwrite the latest selection.

How can I change that in order to make it select "All" when required?

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Me.Range("k1")) Is Nothing Then Exit Sub

Application.EnableEvents = False
Worksheets("Sales").PivotTables("Pivottable1") _
.PageFields("Alpha Name --------------------").CurrentPage =
Target.Value
Application.EnableEvents = True

End Sub
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot Table question: Creating a new field that calculates thedivision of one data field by another Mike C Microsoft Excel Discussion 4 13th Jul 2009 08:15 PM
Excel Pivot Table - Get data in Pivot Field Mark Microsoft Excel Programming 0 24th Oct 2008 09:08 PM
Calculate Data Field To Data Field in Pivot Table? Ronster Microsoft Excel Discussion 2 27th Mar 2007 05:10 PM
How do you control the font size of the data validation field? =?Utf-8?B?amVmZndhbXA=?= Microsoft Excel Misc 1 6th Jan 2006 01:08 AM
Data Validation Pivot Table Hans Microsoft Excel Misc 2 8th Mar 2004 02:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:33 AM.