VBA 刷新数据透视表

Sub pjCount()
    Dim r As Long
    r = Sheets("Inquery").[A65536].End(xlUp).Row
    ActiveSheet.PivotTables("A3").PivotCache.SourceData = _
        "Inquery!R2C2:R" & r & "C4"

    ActiveSheet.PivotTables("A3").PivotCache.Refresh
End Sub

  

posted @ 2019-05-21 16:17  tec2019  阅读(1096)  评论(0编辑  收藏  举报