Today I will show you how to make a macro run a specific time and in specific time intervals. The code below is the code that will allow you to run a macro at a certain time of day and Excel will run the macro at the time you set as long as Excel is open. You will need to change the name of your macro unless it is name TimedMacro.
The next set of code will show you how to make it so the macro will run 5 seconds or 15 minutes after the workbook has been opened. This is useful if you know you will need to run a macro a certain time after opening a workbook. I would suggest using this if you have a macro that you will use every day.
In this tutorial I will be showing you some code so that you will be able to create your own pivot table sing VBA. The code below is the code I got when I created my pivot table this means you are going to have to change a couple of things before it will work for you.
The first part you are going to need to change the source data which is located in the red box below you are just going to need to change it to the range you want.
The next thing you are going to need to change is the table destination, mine is going to be put into sheet2 but you might want to have in sheet1.
The next part is not important but you might find it useful you might also want change the name of the pivot table rather than keeping it as PivotTable3. Now you should be able to run it and have a pivot table crated.