Hi I am new to excel forum. I have recorded a macro. in between there is a pivot table which needs to be daily refreshed with all visible cell. The number of rows and colums will change.
is there any way to refresh the pivot with all visible cells
ActiveSheet.PivotTables("PivotTable4").ChangePivotCache ActiveWorkbook. _
PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"C:\Users\kkk\Desktop\[Jan5.xlsx]Sheet1!R1C1:R179C34" _
, Version:=xlPivotTableVersion12)
as in the code the source is from R1C1:R179C34. is there any way to select only visible cells.
Bookmarks