ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pivotitem count (https://www.excelbanter.com/excel-programming/286354-pivotitem-count.html)

Jesse[_4_]

Pivotitem count
 
Try as I might I can't get the count of items in a pivot field.

I tried

Activesheet.PivotTables("BDStore").PivotField("Sto re").pivotitems.count

But that returns object doesn't support this property or method.

The pivotitems object does have a count property but I'm suspecting I'm not
using it correctly.



Debra Dalgleish

Pivotitem count
 
try adding an "s" to PivotField --

ActiveSheet.PivotTables("BDStore").PivotFields("St ore").PivotItems.Count


Jesse wrote:
Try as I might I can't get the count of items in a pivot field.

I tried

Activesheet.PivotTables("BDStore").PivotField("Sto re").pivotitems.count

But that returns object doesn't support this property or method.

The pivotitems object does have a count property but I'm suspecting I'm not
using it correctly.



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html


Jesse[_4_]

Pivotitem count
 
Still fails with a run time 1004, count method failed.

Jesse




"Debra Dalgleish" wrote in message
...
try adding an "s" to PivotField --

ActiveSheet.PivotTables("BDStore").PivotFields("St ore").PivotItems.Count


Jesse wrote:
Try as I might I can't get the count of items in a pivot field.

I tried

Activesheet.PivotTables("BDStore").PivotField("Sto re").pivotitems.count

But that returns object doesn't support this property or method.

The pivotitems object does have a count property but I'm suspecting I'm

not
using it correctly.



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html




Jesse[_4_]

Pivotitem count
 
I got it working, that with another error I had fixed it.

Pretty much a user problem <grin

Jesse



"Debra Dalgleish" wrote in message
...
try adding an "s" to PivotField --

ActiveSheet.PivotTables("BDStore").PivotFields("St ore").PivotItems.Count


Jesse wrote:
Try as I might I can't get the count of items in a pivot field.

I tried

Activesheet.PivotTables("BDStore").PivotField("Sto re").pivotitems.count

But that returns object doesn't support this property or method.

The pivotitems object does have a count property but I'm suspecting I'm

not
using it correctly.



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html





All times are GMT +1. The time now is 08:42 PM.

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