countingapples
Board Regular
- Joined
- Feb 20, 2003
- Messages
- 243
Can I use: {=sum(1/countif(data,data))} in the following code? If so, how do I do so?
I need to count each instance once. Right now it is returning the counts for every instance. If there are 9 line items for one unique key, I don't want it to return 9, I want it to return 1.
Code:
With ActiveSheet.PivotTables("Unit Response Summary").PivotFields( _
"Incident Type Class")
.Orientation = xlDataField
.Position = 1
End With
ActiveSheet.PivotTables("Unit Response Summary").PivotFields("Count of Incident Type Class"). _
Caption = "Count"
I need to count each instance once. Right now it is returning the counts for every instance. If there are 9 line items for one unique key, I don't want it to return 9, I want it to return 1.