1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

ピポットテーブルの小計を非表示にする方法

Last updated at Posted at 2024-03-21
Sub PivotTableRemoveSubtotals()
    Dim pt As PivotTable
    Dim pf As PivotField

    'ピボットテーブルの設定
    Set pt = ThisWorkbook.Sheets("シート名").PivotTables("ピボットテーブル名")
    
    '小計を非表示にしたいフィールドの設定
    Set pf = pt.PivotFields("フィールド名")
    
    '小計を非表示にする
    pf.Subtotals(1) = False
    
    'すべての小計オプションを非表示にする場合、次のように設定
    Dim i As Integer
    For i = 1 To 12
        pf.Subtotals(i) = False
    Next i
End Sub
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?