【问题标题】:How do i place my pivot table at a specific location?如何将数据透视表放置在特定位置?
【发布时间】:2015-08-27 22:40:54
【问题描述】:

下面的代码为我创建了数据透视表。但我不知道要更改创建数据透视表的目的地的位置。它总是为数据透视表创建一个新工作表。我希望能够在一张表中创建多个数据透视表。

Sub makeHyperIncPivots()
   ActiveWorkbook.Sheets("Hypercare INC").Select
   Range("A1").Select
   Set objtable = Sheets("Hypercare INC").PivotTableWizard

   Set objfield = objtable.PivotFields("Status Title")
   objfield.Orientation = xlRowField

   Set objfield = objtable.PivotFields("Create Week")
   objfield.Orientation = xlColumnField

   Set objfield = objtable.PivotFields("Process Ref")
   objfield.Orientation = xlDataField
   objfield.Function = xlCount

   Sheets("HcINCPivot").PrintPreview



End Sub

【问题讨论】:

    标签: excel pivot-table vba


    【解决方案1】:

    就这么简单。

     Set objtable = Sheets("Hypercare INC").PivotTableWizard(TableDestination:="'Hypercare INC Pivot'!R3C1")
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-06-04
      相关资源
      最近更新 更多