admin管理员组

文章数量:1122832

How can a PivotTable's height and width be measured dynamically without using VBA (i.e., Even when the PivotTable is modified with slicers or through changes in the Field List)? With 'height' being the number of rows the PivotTable spans and 'width' being the corresponding column amount.

With a structured Table in Excel, one can just reference the name of the Table inside a ROWS() or COLUMNS() -formula to get the dynamic height and width, but is there a comprable way for PivotTables?

Non-robust solution: Use COUNTA() to get the number of non-empty cells in the first column and second row of the PivotTable (Prone to errors; Non-empty data outside the PivotTable or empty data inside the PivotTable).

本文标签: excelDynamic measurement of PivotTable height and width (no VBA)Stack Overflow