Forum Discussion
Jesusismygrace
Jul 25, 2023Copper Contributor
Removing Dates from Slicer via VBA
Hi, I am using Excel 365; I created a slicer to filter my pivot table by date. I want to remove any dates before 1/1/2023 from the slicer. Is this possible? The code that I have tried (it filter...
Detlef_Lewin
Jul 25, 2023Silver Contributor
Add a helper column to your data and check whether Date is >=01/01/2023.
Move the field into the pivot table or create a slicer and filter on TRUE.
Jesusismygrace
Jul 25, 2023Copper Contributor
This is my revised helper, and it works, thank you. Is there any way to remove the blanks from the slicer now?
=IF(ISBLANK([@[Start Date]]), UNICHAR(160), IF(OR([@[Start Date]] > TODAY(), [@[Start Date]] < DATE(2023, 1, 1)), UNICHAR(160), EOMONTH([@[Start Date]], 0)))
=IF(ISBLANK([@[Start Date]]), UNICHAR(160), IF(OR([@[Start Date]] > TODAY(), [@[Start Date]] < DATE(2023, 1, 1)), UNICHAR(160), EOMONTH([@[Start Date]], 0)))
- Detlef_LewinJul 26, 2023Silver Contributor