+ Reply to Thread
Results 1 to 6 of 6

change the value of active field in pivot table

Hybrid View

phoeberunner change the value of active... 04-15-2011, 06:36 AM
romperstomper Re: change the value of... 04-15-2011, 07:01 AM
phoeberunner Re: change the value of... 04-15-2011, 07:42 AM
romperstomper Re: change the value of... 04-15-2011, 07:43 AM
phoeberunner Re: change the value of... 04-15-2011, 07:45 AM
romperstomper Re: change the value of... 04-15-2011, 08:10 AM
  1. #1
    Registered User
    Join Date
    04-15-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    18

    change the value of active field in pivot table

    Hi there and thanks in advance for your help.

    I have question regarding changing value of active field in pivot table.

    I have a pivot table in sheet2. The pivot table was generated using data in sheet1.

    The pivot table shows the sum of sales made by Alan, Richard and May in year 1998 and 1999. The values were calculated from data provided in sheet1 which contains the monthly sales for each person.

    1998 1999
    Alan 20 30
    Richard 40 55
    May 35 60


    Here is my pain, I want to prefix the sum of sales for Richard to be 30 for both year 1998 and 1999 regardless of the result returned from data in sheet1. The sum of sales for Alan and May are the summation of data in sheet1.

    I wrote a VB script, but it return error "cannot change this part of a pivottable report".
    Does anyone know how to solve this?

    thanks,
    Phoeberunner
    Last edited by phoeberunner; 04-15-2011 at 09:16 AM.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,974

    Re: change the value of active field in pivot table

    You need to set the EnableDataValueEditing property of the PivotTable to True. Note that your values will get overwritten again if you refresh the table though.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Registered User
    Join Date
    04-15-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: change the value of active field in pivot table

    Quote Originally Posted by romperstomper View Post
    You need to set the EnableDataValueEditing property of the PivotTable to True. Note that your values will get overwritten again if you refresh the table though.

    Where can I find this option? PivotTable - Options? I don't see this option. Please advise.

    Thanks

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,974

    Re: change the value of active field in pivot table

    You have to set it in your code.

  5. #5
    Registered User
    Join Date
    04-15-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: change the value of active field in pivot table

    I found it! Thanks!!!

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,974

    Re: change the value of active field in pivot table

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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