Pivot Table:


For Rows:
Earning Code
Values

For Values:
Sum of Gross
Sum of Hours
Sum of Amount


I tried to record a macro for creating a Pivot Table. Below is the code. I want to be able to do this to any sheet that has the same formatting (unlimited rows or until blank). Once I recorded it, I tried it on a fresh sheet and I got debug error on the code below:

Please Login or Register  to view this content.

This is the full macro I recorded

Please Login or Register  to view this content.