Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default pivot table calculated field with user function

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default pivot table calculated field with user function

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...
--
HTH...

Jim Thomlinson


"puff" wrote:

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.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default pivot table calculated field with user function

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I remove a Calculated Field from the Pivot Table field list TheTraveler Excel Discussion (Misc queries) 2 April 9th 10 06:55 PM
Pivot table, IF function, calculated item versus calculated field NomadPurple Excel Discussion (Misc queries) 1 March 9th 10 03:17 PM
Creating a Calculated Field in a Pivot Table for same field dza7 Excel Discussion (Misc queries) 3 October 21st 09 11:22 PM
Calculated Field and Calculated Item in Pivot Table Fred Smith Excel Discussion (Misc queries) 0 March 4th 07 08:15 PM
pivot table formulas for calculated field or calculated item Vicky Excel Discussion (Misc queries) 3 June 6th 06 05:06 AM


All times are GMT +1. The time now is 10:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"