Macro help or VBA

guaya81

New Member
Joined
May 9, 2018
Messages
25
AADrRks7V-jEykeGlqU89x6ta

Good day

I'm looking for help in programming a macro or a VBA to get filter the slicers for only the today date

please a photo if the file with slicer and where the button will be located



https://www.dropbox.com/sh/ax6g0k3w7kitkjd/AADrRks7V-jEykeGlqU89x6ta?dl=0
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
I have NOT tried this, but just did a search myself looking at a similar problem. Take alook at the code below and see if you can make it work for you.

Code:
Sub ReportFiltering_Single()
'PURPOSE: Filter on a single item with the Report Filter field
'SOURCE: www.TheSpreadsheetGuru.com


Dim pf As PivotField


Set pf = ActiveSheet.PivotTables("PivotTable2").PivotFields("Fiscal_Year")


'Clear Out Any Previous Filtering
  pf.ClearAllFilters


'Filter on 2014 items
  pf.CurrentPage = "2014"


End Sub
[\code]


Take a look here for more info.

https://www.thespreadsheetguru.com/blog/2014/9/27/vba-guide-excel-pivot-tables

HTH,

Jon
 
Upvote 0

Forum statistics

Threads
1,215,889
Messages
6,127,593
Members
449,386
Latest member
owais87

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