VBA code to create Pivot Table

sarisri7 2 Posts Thursday March 1, 2018Registration date March 15, 2018 Last seen - Mar 15, 2018 at 11:26 PM - Latest reply: ac3mark 9176 Posts Monday June 3, 2013Registration dateModeratorStatus April 20, 2018 Last seen
- Mar 16, 2018 at 05:01 PM
Dear all,

Attached and show below the xls sheet.

I need help from the forum, once I click the button, a pivot table to be generated in a new sheet of the same workbook. I tried to do this by Macro recording, but many errors found while running and finally dropped the idea. Pls help me out.

Table

Unit Emp Code
A APCW1940014484
A APCW1940014485
A APCW1940014486
A APCW1940014487
A APCW1940014488
A APCW2940002306
A APCW2940002312
A APCW2940002313
A APCW2940002314
A APCW2940002316
A APCW2940002319
A APCW2940002323
A APCW2940002325
A APCW2940002392
A APCW2940003215
A APCW2940003216
A APCW2940003218
A APCW2940003220



See more 

1 reply

Reply to this topic
ac3mark 9176 Posts Monday June 3, 2013Registration dateModeratorStatus April 20, 2018 Last seen - Mar 16, 2018 at 05:01 PM
0
Helpful
Here you go. Its the documentation for the PIVOT TABLE OBJECT:

https://msdn.microsoft.com/en-us/vba/excel-vba/articles/pivottable-object-excel

Have fun with that!

I do not provide turn key solutions, but assist when your code doesn't work. I have spent my time writing code only to have the OP say it doesn't work, because they cut and paste my solution into their program, and did not understand what variables to change to make it fit into their MODEL!

SO, I encourage you to paste your macro code in here, and let us know where it fails. We can help with that!


Respond to ac3mark