+ Reply to Thread
Results 1 to 6 of 6

Pivot table - cell format to remain the same when refresh

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-24-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2010 (office) 2013 (home)
    Posts
    256

    Pivot table - cell format to remain the same when refresh

    Hi,

    I have generated a few pivot tables and format the cells to the way i prefer in the same workbooks. But whenever i change the field data, the format will back to normal.

    1) Is it possible to have the format remain the same when data has changed? If so, can someone please write me a VBA code so that all the pivot tables have the same type format cells?

    2) In the attached file (has been paste value already), it can be seen that only a few cost centres has cost.in the actual file, column B is in a collapse state, ie details in columns C & D are hidden. I would like to have a control box to expand the those cost centres with amount in it. Would someone please help me to write a VBA code?

    Thanks in advance for all the constructive input.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Pivot table - cell format to remain the same when refresh

    1) No need for VBA, just change the number format in the field settings (right click a number in the field and click field settings)

    2) You can double-click the entries in column B to expand/collapse the groups - VBA could be written but would rely on the field names being identical each time, or being in the same order
    CC


    If you feel really indebted please consider a donation to charity. My preferred charity is ActionAid but there are plenty of worthy alternatives.

  3. #3
    Forum Contributor
    Join Date
    07-24-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2010 (office) 2013 (home)
    Posts
    256

    Re: Pivot table - cell format to remain the same when refresh

    i have generated quite a number of pivot tables. and i find it troublesome to reformat the cell when i change the data, say from July Actual to Aug Actual, etc. i am the one who to generate and tidy up the report for the whole team to view and prepare analyse work. i strongly believe VBA code will help me to reduce the time for the same task greatly, esp when the time is tight.

    Thanks

  4. #4
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Pivot table - cell format to remain the same when refresh

    You seem to be talking about something slightly different:

    First description:
    My existing pivot tables change number format when I alter the source data
    Solution - use the pivot table field setting number format

    Second description:
    I create lots of pivot tables and always need to format them the same way which takes time
    Solution - use a standard format, or possibly a macro, but you'd need to be more specific about what format to apply, for example to the whole table, or just one field, which field, what number format

    Is it either of these, or something else?
    Last edited by Cheeky Charlie; 07-15-2010 at 12:00 PM. Reason: make more sense

  5. #5
    Forum Contributor
    Join Date
    07-24-2009
    Location
    Singapore
    MS-Off Ver
    Excel 2010 (office) 2013 (home)
    Posts
    256

    Re: Pivot table - cell format to remain the same when refresh

    First & Second descriptions meant the same: change data in pivot table. never mention 'add' nor 'chart'.

    Thanks for your input.

  6. #6
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: Pivot table - cell format to remain the same when refresh

    I've changed my post to make it make more sense. I didn't write two descriptions of the same thing, try reading them again.

+ 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