+ Reply to Thread
Results 1 to 3 of 3

pivot table calculated field with user function

  1. #1
    puff
    Guest

    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. #2
    Jim Thomlinson
    Guest

    RE: 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. #3
    puff
    Guest

    Re: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1