[英]Pivot table expand and substract or Show/Hide Details using Excel VBA
我試圖使用以下命令隱藏數據透視表列的詳細信息。 有人可以告訴我這個錯誤嗎?
謝謝。
For Each c In Range("A1:A20000")
With c
If Left(.Value, 2) = "FA" Then ActiveSheet.PivotTables("PivotTable1").PivotFields("Ref 1").PivotItems( _
"*").ShowDetail = False
End With
Next c
終於找到了愚蠢的錯誤
Dim c As Range
For Each c In myfile.Sheets(3).Range("A1:A20000")
With c
If Left(c.Value, 2) = "FA" Then ActiveSheet.PivotTables(1).PivotFields("Ref 1").PivotItems(c.Value).ShowDetail = False
End With
Next
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.