Good day,
thanks for reading and try to help, I have recorded this macro and the only thing that I did here to unselect all dates on slicer and then select today's date
I want to see how can I configure the same code for only selecting today's date only and also this list will grow more eventually
Sub Today_date()
'
' Today_date Macro
' this will run today only
'
' Keyboard Shortcut: Ctrl+q
'
ActiveWorkbook.SlicerCaches("Slicer_Due2").ClearManualFilter
With ActiveWorkbook.SlicerCaches("Slicer_Due2")
.SlicerItems("6/14/2018").Selected = True
.SlicerItems("5/3/2018").Selected = False
.SlicerItems("5/5/2018").Selected = False
.SlicerItems("5/31/2018").Selected = False
.SlicerItems("6/2/2018").Selected = False
.SlicerItems("6/6/2018").Selected = False
.SlicerItems("6/7/2018").Selected = False
.SlicerItems("6/8/2018").Selected = False
.SlicerItems("6/9/2018").Selected = False
.SlicerItems("6/10/2018").Selected = False
.SlicerItems("6/11/2018").Selected = False
.SlicerItems("6/12/2018").Selected = False
.SlicerItems("6/13/2018").Selected = False
.SlicerItems("6/15/2018").Selected = False
.SlicerItems("6/16/2018").Selected = False
.SlicerItems("6/17/2018").Selected = False
.SlicerItems("6/18/2018").Selected = False
.SlicerItems("6/20/2018").Selected = False
.SlicerItems("6/21/2018").Selected = False
.SlicerItems("6/22/2018").Selected = False
.SlicerItems("6/23/2018").Selected = False
.SlicerItems("6/24/2018").Selected = False
.SlicerItems("6/25/2018").Selected = False
.SlicerItems("6/26/2018").Selected = False
.SlicerItems("6/28/2018").Selected = False
.SlicerItems("6/29/2018").Selected = False
.SlicerItems("6/30/2018").Selected = False
.SlicerItems("7/1/2018").Selected = False
.SlicerItems("7/2/2018").Selected = False
.SlicerItems("7/4/2018").Selected = False
.SlicerItems("7/5/2018").Selected = False
.SlicerItems("7/6/2018").Selected = False
.SlicerItems("7/7/2018").Selected = False
.SlicerItems("7/8/2018").Selected = False
.SlicerItems("7/11/2018").Selected = False
.SlicerItems("7/12/2018").Selected = False
.SlicerItems("7/13/2018").Selected = False
.SlicerItems("7/16/2018").Selected = False
.SlicerItems("7/20/2018").Selected = False
.SlicerItems("7/21/2018").Selected = False
.SlicerItems("7/22/2018").Selected = False
.SlicerItems("7/23/2018").Selected = False
.SlicerItems("1/2/2018").Selected = False
.SlicerItems("1/3/2018").Selected = False
.SlicerItems("1/4/2018").Selected = False
.SlicerItems("1/5/2018").Selected = False
.SlicerItems("1/6/2018").Selected = False
.SlicerItems("1/7/2018").Selected = False
.SlicerItems("1/8/2018").Selected = False
.SlicerItems("1/9/2018").Selected = False
.SlicerItems("1/10/2018").Selected = False
.SlicerItems("1/11/2018").Selected = False
.SlicerItems("1/12/2018").Selected = False
.SlicerItems("1/14/2018").Selected = False
.SlicerItems("1/15/2018").Selected = False
.SlicerItems("1/16/2018").Selected = False
.SlicerItems("1/17/2018").Selected = False
.SlicerItems("1/18/2018").Selected = False
.SlicerItems("1/19/2018").Selected = False
.SlicerItems("1/20/2018").Selected = False
.SlicerItems("1/21/2018").Selected = False
.SlicerItems("1/22/2018").Selected = False
.SlicerItems("1/23/2018").Selected = False
.SlicerItems("1/24/2018").Selected = False
.SlicerItems("1/25/2018").Selected = False
.SlicerItems("1/26/2018").Selected = False
.SlicerItems("1/27/2018").Selected = False
.SlicerItems("1/28/2018").Selected = False
.SlicerItems("1/29/2018").Selected = False
.SlicerItems("1/30/2018").Selected = False
.SlicerItems("1/31/2018").Selected = False
.SlicerItems("2/1/2018").Selected = False
.SlicerItems("2/2/2018").Selected = False
.SlicerItems("2/3/2018").Selected = False
.SlicerItems("2/4/2018").Selected = False
.SlicerItems("2/5/2018").Selected = False
.SlicerItems("2/6/2018").Selected = False
.SlicerItems("2/7/2018").Selected = False
.SlicerItems("2/8/2018").Selected = False
.SlicerItems("2/9/2018").Selected = False
.SlicerItems("2/10/2018").Selected = False
.SlicerItems("2/11/2018").Selected = False
.SlicerItems("2/12/2018").Selected = False
.SlicerItems("2/13/2018").Selected = False
.SlicerItems("2/14/2018").Selected = False
.SlicerItems("2/15/2018").Selected = False
.SlicerItems("2/16/2018").Selected = False
.SlicerItems("2/17/2018").Selected = False
.SlicerItems("2/18/2018").Selected = False
.SlicerItems("2/19/2018").Selected = False
.SlicerItems("2/20/2018").Selected = False
.SlicerItems("2/21/2018").Selected = False
.SlicerItems("2/22/2018").Selected = False
.SlicerItems("2/23/2018").Selected = False
.SlicerItems("2/24/2018").Selected = False
.SlicerItems("2/25/2018").Selected = False
.SlicerItems("2/26/2018").Selected = False
.SlicerItems("2/27/2018").Selected = False
.SlicerItems("2/28/2018").Selected = False
.SlicerItems("3/1/2018").Selected = False
.SlicerItems("3/2/2018").Selected = False
.SlicerItems("3/3/2018").Selected = False
.SlicerItems("3/4/2018").Selected = False
.SlicerItems("3/5/2018").Selected = False
.SlicerItems("3/6/2018").Selected = False
.SlicerItems("3/7/2018").Selected = False
.SlicerItems("3/8/2018").Selected = False
.SlicerItems("3/9/2018").Selected = False
.SlicerItems("3/10/2018").Selected = False
.SlicerItems("3/11/2018").Selected = False
.SlicerItems("3/12/2018").Selected = False
.SlicerItems("3/13/2018").Selected = False
.SlicerItems("3/14/2018").Selected = False
.SlicerItems("3/15/2018").Selected = False
.SlicerItems("3/16/2018").Selected = False
.SlicerItems("3/17/2018").Selected = False
.SlicerItems("3/18/2018").Selected = False
.SlicerItems("3/19/2018").Selected = False
.SlicerItems("3/20/2018").Selected = False
.SlicerItems("3/21/2018").Selected = False
.SlicerItems("3/22/2018").Selected = False
.SlicerItems("3/23/2018").Selected = False
.SlicerItems("3/24/2018").Selected = False
.SlicerItems("3/25/2018").Selected = False
.SlicerItems("3/26/2018").Selected = False
.SlicerItems("3/27/2018").Selected = False
.SlicerItems("3/28/2018").Selected = False
.SlicerItems("3/29/2018").Selected = False
.SlicerItems("3/30/2018").Selected = False
.SlicerItems("3/31/2018").Selected = False
.SlicerItems("4/1/2018").Selected = False
.SlicerItems("4/2/2018").Selected = False
.SlicerItems("4/3/2018").Selected = False
.SlicerItems("4/4/2018").Selected = False
.SlicerItems("4/5/2018").Selected = False
.SlicerItems("4/6/2018").Selected = False
.SlicerItems("4/7/2018").Selected = False
.SlicerItems("4/8/2018").Selected = False
.SlicerItems("4/9/2018").Selected = False
.SlicerItems("4/10/2018").Selected = False
.SlicerItems("4/11/2018").Selected = False
.SlicerItems("4/12/2018").Selected = False
.SlicerItems("4/13/2018").Selected = False
.SlicerItems("4/14/2018").Selected = False
.SlicerItems("4/15/2018").Selected = False
.SlicerItems("4/16/2018").Selected = False
.SlicerItems("4/17/2018").Selected = False
.SlicerItems("4/18/2018").Selected = False
.SlicerItems("4/19/2018").Selected = False
.SlicerItems("4/20/2018").Selected = False
.SlicerItems("4/21/2018").Selected = False
.SlicerItems("4/22/2018").Selected = False
.SlicerItems("4/23/2018").Selected = False
.SlicerItems("4/24/2018").Selected = False
.SlicerItems("4/25/2018").Selected = False
.SlicerItems("4/26/2018").Selected = False
.SlicerItems("4/27/2018").Selected = False
.SlicerItems("4/28/2018").Selected = False
.SlicerItems("4/29/2018").Selected = False
.SlicerItems("4/30/2018").Selected = False
.SlicerItems("5/1/2018").Selected = False
.SlicerItems("5/2/2018").Selected = False
.SlicerItems("5/4/2018").Selected = False
.SlicerItems("5/6/2018").Selected = False
.SlicerItems("5/7/2018").Selected = False
.SlicerItems("5/8/2018").Selected = False
.SlicerItems("5/9/2018").Selected = False
.SlicerItems("5/10/2018").Selected = False
.SlicerItems("5/11/2018").Selected = False
.SlicerItems("5/12/2018").Selected = False
.SlicerItems("5/13/2018").Selected = False
.SlicerItems("5/14/2018").Selected = False
.SlicerItems("5/15/2018").Selected = False
.SlicerItems("5/16/2018").Selected = False
.SlicerItems("5/17/2018").Selected = False
.SlicerItems("5/18/2018").Selected = False
.SlicerItems("5/19/2018").Selected = False
.SlicerItems("5/20/2018").Selected = False
.SlicerItems("5/21/2018").Selected = False
.SlicerItems("5/22/2018").Selected = False
.SlicerItems("5/23/2018").Selected = False
.SlicerItems("5/24/2018").Selected = False
.SlicerItems("5/25/2018").Selected = False
.SlicerItems("5/26/2018").Selected = False
.SlicerItems("5/27/2018").Selected = False
.SlicerItems("5/28/2018").Selected = False
.SlicerItems("5/29/2018").Selected = False
.SlicerItems("5/30/2018").Selected = False
.SlicerItems("6/1/2018").Selected = False
.SlicerItems("6/3/2018").Selected = False
.SlicerItems("6/4/2018").Selected = False
.SlicerItems("6/5/2018").Selected = False
.SlicerItems("6/19/2018").Selected = False
.SlicerItems("6/27/2018").Selected = False
.SlicerItems("7/9/2018").Selected = False
.SlicerItems("7/10/2018").Selected = False
.SlicerItems("7/27/2018").Selected = False
End With
End Sub
thanks for reading and try to help, I have recorded this macro and the only thing that I did here to unselect all dates on slicer and then select today's date
I want to see how can I configure the same code for only selecting today's date only and also this list will grow more eventually
Sub Today_date()
'
' Today_date Macro
' this will run today only
'
' Keyboard Shortcut: Ctrl+q
'
ActiveWorkbook.SlicerCaches("Slicer_Due2").ClearManualFilter
With ActiveWorkbook.SlicerCaches("Slicer_Due2")
.SlicerItems("6/14/2018").Selected = True
.SlicerItems("5/3/2018").Selected = False
.SlicerItems("5/5/2018").Selected = False
.SlicerItems("5/31/2018").Selected = False
.SlicerItems("6/2/2018").Selected = False
.SlicerItems("6/6/2018").Selected = False
.SlicerItems("6/7/2018").Selected = False
.SlicerItems("6/8/2018").Selected = False
.SlicerItems("6/9/2018").Selected = False
.SlicerItems("6/10/2018").Selected = False
.SlicerItems("6/11/2018").Selected = False
.SlicerItems("6/12/2018").Selected = False
.SlicerItems("6/13/2018").Selected = False
.SlicerItems("6/15/2018").Selected = False
.SlicerItems("6/16/2018").Selected = False
.SlicerItems("6/17/2018").Selected = False
.SlicerItems("6/18/2018").Selected = False
.SlicerItems("6/20/2018").Selected = False
.SlicerItems("6/21/2018").Selected = False
.SlicerItems("6/22/2018").Selected = False
.SlicerItems("6/23/2018").Selected = False
.SlicerItems("6/24/2018").Selected = False
.SlicerItems("6/25/2018").Selected = False
.SlicerItems("6/26/2018").Selected = False
.SlicerItems("6/28/2018").Selected = False
.SlicerItems("6/29/2018").Selected = False
.SlicerItems("6/30/2018").Selected = False
.SlicerItems("7/1/2018").Selected = False
.SlicerItems("7/2/2018").Selected = False
.SlicerItems("7/4/2018").Selected = False
.SlicerItems("7/5/2018").Selected = False
.SlicerItems("7/6/2018").Selected = False
.SlicerItems("7/7/2018").Selected = False
.SlicerItems("7/8/2018").Selected = False
.SlicerItems("7/11/2018").Selected = False
.SlicerItems("7/12/2018").Selected = False
.SlicerItems("7/13/2018").Selected = False
.SlicerItems("7/16/2018").Selected = False
.SlicerItems("7/20/2018").Selected = False
.SlicerItems("7/21/2018").Selected = False
.SlicerItems("7/22/2018").Selected = False
.SlicerItems("7/23/2018").Selected = False
.SlicerItems("1/2/2018").Selected = False
.SlicerItems("1/3/2018").Selected = False
.SlicerItems("1/4/2018").Selected = False
.SlicerItems("1/5/2018").Selected = False
.SlicerItems("1/6/2018").Selected = False
.SlicerItems("1/7/2018").Selected = False
.SlicerItems("1/8/2018").Selected = False
.SlicerItems("1/9/2018").Selected = False
.SlicerItems("1/10/2018").Selected = False
.SlicerItems("1/11/2018").Selected = False
.SlicerItems("1/12/2018").Selected = False
.SlicerItems("1/14/2018").Selected = False
.SlicerItems("1/15/2018").Selected = False
.SlicerItems("1/16/2018").Selected = False
.SlicerItems("1/17/2018").Selected = False
.SlicerItems("1/18/2018").Selected = False
.SlicerItems("1/19/2018").Selected = False
.SlicerItems("1/20/2018").Selected = False
.SlicerItems("1/21/2018").Selected = False
.SlicerItems("1/22/2018").Selected = False
.SlicerItems("1/23/2018").Selected = False
.SlicerItems("1/24/2018").Selected = False
.SlicerItems("1/25/2018").Selected = False
.SlicerItems("1/26/2018").Selected = False
.SlicerItems("1/27/2018").Selected = False
.SlicerItems("1/28/2018").Selected = False
.SlicerItems("1/29/2018").Selected = False
.SlicerItems("1/30/2018").Selected = False
.SlicerItems("1/31/2018").Selected = False
.SlicerItems("2/1/2018").Selected = False
.SlicerItems("2/2/2018").Selected = False
.SlicerItems("2/3/2018").Selected = False
.SlicerItems("2/4/2018").Selected = False
.SlicerItems("2/5/2018").Selected = False
.SlicerItems("2/6/2018").Selected = False
.SlicerItems("2/7/2018").Selected = False
.SlicerItems("2/8/2018").Selected = False
.SlicerItems("2/9/2018").Selected = False
.SlicerItems("2/10/2018").Selected = False
.SlicerItems("2/11/2018").Selected = False
.SlicerItems("2/12/2018").Selected = False
.SlicerItems("2/13/2018").Selected = False
.SlicerItems("2/14/2018").Selected = False
.SlicerItems("2/15/2018").Selected = False
.SlicerItems("2/16/2018").Selected = False
.SlicerItems("2/17/2018").Selected = False
.SlicerItems("2/18/2018").Selected = False
.SlicerItems("2/19/2018").Selected = False
.SlicerItems("2/20/2018").Selected = False
.SlicerItems("2/21/2018").Selected = False
.SlicerItems("2/22/2018").Selected = False
.SlicerItems("2/23/2018").Selected = False
.SlicerItems("2/24/2018").Selected = False
.SlicerItems("2/25/2018").Selected = False
.SlicerItems("2/26/2018").Selected = False
.SlicerItems("2/27/2018").Selected = False
.SlicerItems("2/28/2018").Selected = False
.SlicerItems("3/1/2018").Selected = False
.SlicerItems("3/2/2018").Selected = False
.SlicerItems("3/3/2018").Selected = False
.SlicerItems("3/4/2018").Selected = False
.SlicerItems("3/5/2018").Selected = False
.SlicerItems("3/6/2018").Selected = False
.SlicerItems("3/7/2018").Selected = False
.SlicerItems("3/8/2018").Selected = False
.SlicerItems("3/9/2018").Selected = False
.SlicerItems("3/10/2018").Selected = False
.SlicerItems("3/11/2018").Selected = False
.SlicerItems("3/12/2018").Selected = False
.SlicerItems("3/13/2018").Selected = False
.SlicerItems("3/14/2018").Selected = False
.SlicerItems("3/15/2018").Selected = False
.SlicerItems("3/16/2018").Selected = False
.SlicerItems("3/17/2018").Selected = False
.SlicerItems("3/18/2018").Selected = False
.SlicerItems("3/19/2018").Selected = False
.SlicerItems("3/20/2018").Selected = False
.SlicerItems("3/21/2018").Selected = False
.SlicerItems("3/22/2018").Selected = False
.SlicerItems("3/23/2018").Selected = False
.SlicerItems("3/24/2018").Selected = False
.SlicerItems("3/25/2018").Selected = False
.SlicerItems("3/26/2018").Selected = False
.SlicerItems("3/27/2018").Selected = False
.SlicerItems("3/28/2018").Selected = False
.SlicerItems("3/29/2018").Selected = False
.SlicerItems("3/30/2018").Selected = False
.SlicerItems("3/31/2018").Selected = False
.SlicerItems("4/1/2018").Selected = False
.SlicerItems("4/2/2018").Selected = False
.SlicerItems("4/3/2018").Selected = False
.SlicerItems("4/4/2018").Selected = False
.SlicerItems("4/5/2018").Selected = False
.SlicerItems("4/6/2018").Selected = False
.SlicerItems("4/7/2018").Selected = False
.SlicerItems("4/8/2018").Selected = False
.SlicerItems("4/9/2018").Selected = False
.SlicerItems("4/10/2018").Selected = False
.SlicerItems("4/11/2018").Selected = False
.SlicerItems("4/12/2018").Selected = False
.SlicerItems("4/13/2018").Selected = False
.SlicerItems("4/14/2018").Selected = False
.SlicerItems("4/15/2018").Selected = False
.SlicerItems("4/16/2018").Selected = False
.SlicerItems("4/17/2018").Selected = False
.SlicerItems("4/18/2018").Selected = False
.SlicerItems("4/19/2018").Selected = False
.SlicerItems("4/20/2018").Selected = False
.SlicerItems("4/21/2018").Selected = False
.SlicerItems("4/22/2018").Selected = False
.SlicerItems("4/23/2018").Selected = False
.SlicerItems("4/24/2018").Selected = False
.SlicerItems("4/25/2018").Selected = False
.SlicerItems("4/26/2018").Selected = False
.SlicerItems("4/27/2018").Selected = False
.SlicerItems("4/28/2018").Selected = False
.SlicerItems("4/29/2018").Selected = False
.SlicerItems("4/30/2018").Selected = False
.SlicerItems("5/1/2018").Selected = False
.SlicerItems("5/2/2018").Selected = False
.SlicerItems("5/4/2018").Selected = False
.SlicerItems("5/6/2018").Selected = False
.SlicerItems("5/7/2018").Selected = False
.SlicerItems("5/8/2018").Selected = False
.SlicerItems("5/9/2018").Selected = False
.SlicerItems("5/10/2018").Selected = False
.SlicerItems("5/11/2018").Selected = False
.SlicerItems("5/12/2018").Selected = False
.SlicerItems("5/13/2018").Selected = False
.SlicerItems("5/14/2018").Selected = False
.SlicerItems("5/15/2018").Selected = False
.SlicerItems("5/16/2018").Selected = False
.SlicerItems("5/17/2018").Selected = False
.SlicerItems("5/18/2018").Selected = False
.SlicerItems("5/19/2018").Selected = False
.SlicerItems("5/20/2018").Selected = False
.SlicerItems("5/21/2018").Selected = False
.SlicerItems("5/22/2018").Selected = False
.SlicerItems("5/23/2018").Selected = False
.SlicerItems("5/24/2018").Selected = False
.SlicerItems("5/25/2018").Selected = False
.SlicerItems("5/26/2018").Selected = False
.SlicerItems("5/27/2018").Selected = False
.SlicerItems("5/28/2018").Selected = False
.SlicerItems("5/29/2018").Selected = False
.SlicerItems("5/30/2018").Selected = False
.SlicerItems("6/1/2018").Selected = False
.SlicerItems("6/3/2018").Selected = False
.SlicerItems("6/4/2018").Selected = False
.SlicerItems("6/5/2018").Selected = False
.SlicerItems("6/19/2018").Selected = False
.SlicerItems("6/27/2018").Selected = False
.SlicerItems("7/9/2018").Selected = False
.SlicerItems("7/10/2018").Selected = False
.SlicerItems("7/27/2018").Selected = False
End With
End Sub