
Lets say, I have 5 respondents for each survey. This imported survey data has 6 (Six) options (1, 2, 3, 4, 5, and N/A) for each survey question. I have a survey form send to various survey respondents which is now completed and I have already exported it as an Excel File. MsgBox "Your Pivot Table is now updated."Ĭould somebody help me create a macro script for the following routine. Pivot_Sheet.PivotTables(PivotName).RefreshTable PivotCaches.Create(SourceType:=xlDatabase, SourceData:=NewRange) 'Change Pivot Table Data Source Range Address NewRange = Data_Sheet.Name & "!" & DataRange.Address(ReferenceStyle:=xlR1C1) Set DataRange = Data_Sheet.Range(StartPoint, Cells(DownCell, LastCol)) LastCol = StartPoint.End(xlToRight).Column Set Pivot_Sheet = ThisWorkbook.Worksheets("Pivot3") Set Data_Sheet = ThisWorkbook.Worksheets("PivotTableData3")
