Macro for automatic overview of yesterday (with slicers, pivot table and pivot chart)

KriCo 1 Reputation point
2021-06-22T16:33:47.98+00:00

Hey,

I have a problem with my macro for automatic selecting yesterday (so tomorrow i want an overview of today, or simple day -1).
And this overview has to be in the setup like the attached picture "capture.jpg". So it's a worksheet containing slicers, pivot table and pivot chart.

My current problem is when i run the macro, i get the overview of the entire month instead of only yesterday.

I attached my macro in the picture "macro.jpg".

Could anyone help me with this ?

Office Visual Basic for Applications
Office Visual Basic for Applications
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Visual Basic for Applications: An implementation of Visual Basic that is built into Microsoft products.
1,506 questions
{count} votes

1 answer

Sort by: Most helpful
  1. KriCo 1 Reputation point
    2021-06-23T07:12:23.567+00:00

    Everything works when i manually select the date i want... So all the connections between the chart, slicer and table are working.

    The macro also work, but when i run the macro it 's selecting everyday before yesterday. Not only yesterday...


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.