Hello!
I am currently learning VBA programming and am trying to do the following:
Record a macro to:
1) Select a set of data
2) Make a pivot table out of it
in a new sheet
I have tried doing this, but get an error message. I think this is because I somehow need to make both the new sheet name/number and the new pivot table name/number dynamic? At the moment the code says e.g. "insert sheet 3" and create "pivot table 3", where of course the number will change when I repeat the process? I would want to repeat the process for an unlimited amount of times though without having to change the code every time.
The code runs if you press ctrl-shift-A in the document attached.
I would be really, really grateful for any help!
Thanks!