pivot table calculated field with user function

P

puff

Is it possible/how do I use a user function for a pivot table
calculated field? Something like the following:

With pt
.AddFields RowFields:="Vendor", ColumnFields:="Channel"
.PivotFields("Name").Orientation = xlDataField
.CalculatedFields.Add name:="BlueBox",
Formula:="=CountBlueBox(Name,Channel)"
With .PivotFields("BlueBox")
.Orientation = xlDataField
End With
End With

I don't seem to understand how to specify the function CountBlueBox as
the Formula.
 
G

Guest

To the best of my knowledge you can not use a UDF with a Pivot Table. You
could add an extra column into your source data and add the UDF value to that
column perhaps...
 
P

puff

Thanks for the information. I was affraid of that. I ended up having
to make another table.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top