The code that starts with the line "for each PT" and ends with the line "next PT" is especially designed to work with every pivot table on your sheet. You need to replace this with code that refers to your single pivot table.

Replace the line that starts "for each...." With
set PT = THE NAME OF YOUR PIVOT TABLE HERE
Replace the line "next PT" with
set PT = nothing
To find out the full name of your pivot table, i suggest the following
Turn on the macro recorder
Click in the pivot table
Click refresh
Stop the macro recorder
Look at the code - it will show you the full name of the pivot table. Use that name where indicated above.