| 
    
     |  | >PivotItems時にゼロベースから... 全アイテムを非選択(非表示)にはできないです。
 Loopで時間がかかるなら、Deleteを使ってみてください。
 
 例えば先頭の1コだけ残す例。
 Sub try()
 Const p = 3
 Dim x As Long
 
 With ActiveSheet.PivotTables(1)
 If Not .ColumnGrand Then x = 1
 With .RowRange.Columns(1).Cells
 .Item(p).Resize(.Count - p + x).Delete
 End With
 End With
 End Sub
 
 列方向の場合は
 Const p = 2
 Dim x As Long
 
 With ActiveSheet.PivotTables(1)
 If Not .RowGrand Then x = 1
 With .ColumnRange.Rows(2).Cells
 .Item(p).Resize(, .Count - p + x).Delete
 End With
 End With
 
 
 更新前後のCountを比較して増えたItemだけ非表示にするなら
 Dim p As Long
 Dim x As Long
 Dim n As Long
 
 With ActiveSheet.PivotTables(1)
 If Not .ColumnGrand Then x = 1
 p = .RowRange.Columns(1).Cells.Count
 .RefreshTable
 With .RowRange.Columns(1).Cells
 n = .Count - p
 If n > 0 Then
 .Item(p + x).Resize(n).Delete
 End If
 End With
 End With
 #更新前に選択していたItemが無くなる事がある場合は使えません。
 
 |  |