Hi
Thank u so much for quick response...
You are correct, there are 8 Pivot tables in vendor pivots sheets and I want to select dates in each pivot...like below example....
[TABLE="width: 3421"]
<TBODY>[TR]
[TD]Created Date1</SPAN>[/TD]
[TD](All)</SPAN>[/TD]
[TD][/TD]
[TD][/TD]
[TD]Offer Made1</SPAN>[/TD]
[TD](All)</SPAN>[/TD]
[TD][/TD]
[TD]Joined On1</SPAN>[/TD]
[TD](All)</SPAN>[/TD]
[TD="align: left"]
False Pict </SPAN>
[/TD]
[TD]Created Date1</SPAN>[/TD]
[TD](Multiple Items)</SPAN>[/TD]
[TD][/TD]
[TD]Offer Pending1</SPAN>[/TD]
[TD](Multiple Items)</SPAN>[/TD]
[/TR]
[TR]
[TD]Vendor Vs Employee Referral1</SPAN>[/TD]
[TD]Vendor</SPAN>[/TD]
[TD][/TD]
[TD][/TD]
[TD]Vendor Vs Employee Referral1</SPAN>[/TD]
[TD]Vendor</SPAN>[/TD]
[TD][/TD]
[TD]Vendor Vs Employee Referral1</SPAN>[/TD]
[TD]Vendor</SPAN>[/TD]
[TD][/TD]
[TD]Vendor Vs Employee Referral1</SPAN>[/TD]
[TD]Vendor</SPAN>[/TD]
[TD][/TD]
[TD]Vendor Vs Employee Referral1</SPAN>[/TD]
[TD]Vendor</SPAN>[/TD]
[/TR]
[TR]
[TD]Stage</SPAN>[/TD]
[TD](Multiple Items)</SPAN>[/TD]
[TD][/TD]
[TD][/TD]
[TD]Client</SPAN>[/TD]
[TD](All)</SPAN>[/TD]
[TD][/TD]
[TD]Status</SPAN>[/TD]
[TD]Joined</SPAN>[/TD]
[TD][/TD]
[TD]Stage</SPAN>[/TD]
[TD]Offer</SPAN>[/TD]
[TD][/TD]
[TD]Client</SPAN>[/TD]
[TD](All)</SPAN>[/TD]
[/TR]
[TR]
[TD]Status</SPAN>[/TD]
[TD](Multiple Items)</SPAN>[/TD]
[TD][/TD]
[TD][/TD]
[TD]Agency1</SPAN>[/TD]
[TD](All)</SPAN>[/TD]
[TD][/TD]
[TD]Client</SPAN>[/TD]
[TD](All)</SPAN>[/TD]
[TD][/TD]
[TD]Status</SPAN>[/TD]
[TD](Multiple Items)</SPAN>[/TD]
[TD]`</SPAN>[/TD]
[TD]Agency1</SPAN>[/TD]
[TD](All)</SPAN>[/TD]
[/TR]
[TR]
[TD]Client</SPAN>[/TD]
[TD](All)</SPAN>[/TD]
[TD][/TD]
[TD][/TD]
[TD]Location</SPAN>[/TD]
[TD](All)</SPAN>[/TD]
[TD][/TD]
[TD]Agency1</SPAN>[/TD]
[TD](All)</SPAN>[/TD]
[TD][/TD]
[TD]Client</SPAN>[/TD]
[TD](All)</SPAN>[/TD]
[TD][/TD]
[TD]Location</SPAN>[/TD]
[TD](All)</SPAN>[/TD]
[/TR]
[TR]
[TD]Agency1</SPAN>[/TD]
[TD](All)</SPAN>[/TD]
[TD][/TD]
[TD][/TD]
[TD]Offered[/TD]
[TD][/TD]
[TD][/TD]
[TD]Location</SPAN>[/TD]
[TD](All)</SPAN>[/TD]
[TD][/TD]
[TD]Agency1</SPAN>[/TD]
[TD](All)</SPAN>[/TD]
[TD][/TD]
[TD]Selected Candidates</SPAN>[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Location</SPAN>[/TD]
[TD](All)</SPAN>[/TD]
[TD][/TD]
[TD][/TD]
[TD]Row Labels[/TD]
[TD]Count of Candidate Name[/TD]
[TD][/TD]
[TD]Joined On[/TD]
[TD][/TD]
[TD][/TD]
[TD]Location</SPAN>[/TD]
[TD](All)</SPAN>[/TD]
[TD][/TD]
[TD]Row Labels[/TD]
[TD]Count of Candidate Name[/TD]
[/TR]
[TR]
[TD]Interview Attended[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]<--None--></SPAN>[/TD]
[TD="align: right"]30</SPAN>[/TD]
[TD][/TD]
[TD]Row Labels[/TD]
[TD]Count of Candidate Name[/TD]
[TD][/TD]
[TD]Offer Rejected[/TD]
[TD][/TD]
[TD][/TD]
[TD]2COMS Consulting - 1100007467</SPAN>[/TD]
[TD="align: right"]1</SPAN>[/TD]
[/TR]
[TR]
[TD]Row Labels[/TD]
[TD]Count of Candidate Name[/TD]
[TD][/TD]
[TD][/TD]
[TD]2COMS Consulting - 1100007467</SPAN>[/TD]
[TD="align: right"]310</SPAN>[/TD]
[TD][/TD]
[TD]2COMS Consulting - 1100007467</SPAN>[/TD]
[TD="align: right"]9</SPAN>[/TD]
[TD][/TD]
[TD]Row Labels[/TD]
[TD]Count of Candidate Name[/TD]
[TD][/TD]
[TD]5 Elements Techno Services (P) Ltd - 1100007698</SPAN>[/TD]
[TD="align: right"]4</SPAN>[/TD]
[/TR]
[TR]
[TD]<--None--></SPAN>[/TD]
[TD="align: right"]18</SPAN>[/TD]
[TD][/TD]
[TD][/TD]
[TD]5 Elements Techno Services (P) Ltd - 1100007698</SPAN>[/TD]
[TD="align: right"]271</SPAN>[/TD]
[TD][/TD]
[TD]5 Elements Techno Services (P) Ltd - 1100007698</SPAN>[/TD]
[TD="align: right"]35</SPAN>[/TD]
[TD][/TD]
[TD]Grand Total[/TD]
[TD][/TD]
[TD][/TD]
[TD]Abacus Consultants - 1100003961</SPAN>[/TD]
[TD="align: right"]2</SPAN>[/TD]
[/TR]
[TR]
[TD]2COMS Consulting - 1100007467</SPAN>[/TD]
[TD="align: right"]156</SPAN>[/TD]
[TD][/TD]
[TD][/TD]
[TD]9.9 EXPERTS - 1100007481</SPAN>[/TD]
[TD="align: right"]41</SPAN>[/TD]
[TD][/TD]
[TD]9.9 EXPERTS - 1100007481</SPAN>[/TD]
[TD="align: right"]3</SPAN>[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]ABC Consultants - 1100007039</SPAN>[/TD]
[TD="align: right"]1</SPAN>[/TD]
[/TR]
</TBODY><COLGROUP><COL><COL><COL><COL><COL><COL><COL><COL><COL><COL><COL><COL><COL><COL><COL></COLGROUP>[/TABLE]
Please let me know if u need anything else.....if u want i can send u my excel file but don't know how to send you.
Thanks,
Arvind Kaushik
The problem might be that a text comparison is happening instead of a date comparison.
Before addresssing that though, please clarify what you are trying to do with this part of the code.
Code:
For Each PT In ActiveSheet.PivotTables
mypvt = PT
With Sheets("Vendor Pivots")
Set PT = .PivotTables(mypvt)
MsgBox PT.PageFields.Count
For i = 1 To PT.PageFields.Count
getFld = PT.PageFields(i)
If getFld = "Created Date1" Or getFld = "Joined On1" _
Or getFld = "Offer Pending1" Or getFld = "Offer Made1" _
Or getFld = "HAT Test - Schedule1" Then
Exit For
End If
Next
End With
Are you trying to apply the date filters to all pivottables on Sheet "Vendor Pivots"?
Is the PageField with the Dates to be filtered named differently in each Pivot- so you are trying to find the correct field in each PivotTable?