Hi,
I am getting type mismatch error while running this code.
Dim table2 As PivotTable
Worksheets("CR").Select
Set data = ActiveWorkbook.PivotCaches.Create(xlDatabase, Range("A1", Range("A1").End(xlToRight).End(xlDown)))
Set table2 = data.CreatePivotTable(Worksheets("SUMMARY").Range("B23"))...