Sub Pays()
Dim ws As Worksheet, Total As Range, Pays As String, TCDSource As String
With Worksheets("TCD").PivotTables(1)
.PivotFields("Country").ClearAllFilters
.PivotFields("Country").CurrentPage = "(All)"
.ShowPages PageField:="Country"
End With
For Each ws In ActiveWorkbook.Worksheets
If ws.Name <> "TCD" And ws.PivotTables.Count > 0 Then
Set Total = ws.Cells(ws.PivotTables(1).TableRange2.Rows.Count, ws.PivotTables(1).TableRange2.Columns.Count)
Pays = ws.Cells(1, 2).Value
Total.ShowDetail = True
ActiveSheet.Name = Pays & "_Data"
TCDSource = Replace(Pays, " ", "_")
ActiveSheet.ListObjects(1).Name = TCDSource
ws.PivotTables(1).ChangePivotCache _
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
TCDSource)
End If
Next ws
End Sub