ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to count columns i pivot table? (https://www.excelbanter.com/excel-programming/438784-how-count-columns-i-pivot-table.html)

ulfb[_2_]

how to count columns i pivot table?
 
Hi
My pivot is dynamic, created with VB, and number of columns will vary.
I need this count in a variable for use in further processing.
Any assistance appreciated!
/ulf


JLGWhiz[_2_]

how to count columns i pivot table?
 
Untested:

Sub aj()
myCol = ActiveSheet.PivotTables(1).TableRange2.Columns.Cou nt
MsgBox myCol
End Sub

"ulfb" wrote in message
...
Hi
My pivot is dynamic, created with VB, and number of columns will vary.
I need this count in a variable for use in further processing.
Any assistance appreciated!
/ulf





All times are GMT +1. The time now is 02:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com