Struggling with trying to use VBA to dynamically shift Pivot table filters (tying them to a name variable)

sx502

New Member
Joined
Oct 11, 2021
Messages
1
Office Version
  1. 2019
Platform
  1. Windows

For additional context.

Basically, I executed the Format code above, and if the targeted named in cell in question (ReportDate1) is not a pivot table filter value, it would generate the correct value 2019-12-31. However, if the cell value IS a pivot table filter value (ReportDate1), it would auto-convert into 43830 (the corresponding date number for the date) and create an error.....how do I make it so that the 2019-12-31 value is directly inserted into the Pivot Table filter value?
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,214,971
Messages
6,122,525
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top