Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
FA
 
Posts: n/a
Default Data validation Formula

With your help I prepared the following code to control a pivot table using a
data validation field:
Private Sub Worksheet_Change(ByVal Target As Range)

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

Application.EnableEvents = False
Worksheets("Profile").PivotTables("Pivottable1") _
.PageFields("Prescriber Name").CurrentPage = Target.Value
Application.EnableEvents = True

End Sub

I want to have two of this in one page. I do not know much of VBA.
How can I do this?
Thank you very much!
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
Any cell containing formula seen as data instead of formula Jeffry61 Excel Worksheet Functions 2 September 23rd 05 02:04 PM
named range, data validation: list non-selected items, and new added items KR Excel Discussion (Misc queries) 1 June 24th 05 05:21 AM
HELP: Data > Validation ---List ----Formula amit Excel Worksheet Functions 3 April 15th 05 01:38 PM
Effect of Conditional Formatting, Data Validation Bill Sturdevant Excel Discussion (Misc queries) 1 January 25th 05 11:50 PM
Excel2K: Is it possible to use dynamic named ranges in custom data validation formula? Arvi Laanemets Excel Discussion (Misc queries) 0 December 2nd 04 11:29 AM


All times are GMT +1. The time now is 02:39 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"