VBA code to create Pivot Table [Closed]

Posts
2
Registration date
Thursday March 1, 2018
Status
Member
Last seen
March 15, 2018
- - Latest reply: ac3mark
Posts
13031
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
October 11, 2019
- 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

Posts
13031
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
October 11, 2019
1571
0
Thank you
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!