+ Reply to Thread
Results 1 to 3 of 3

Pivot Table Formatting Issue

  1. #1
    Registered User
    Join Date
    04-10-2014
    Location
    Tallahassee, FL
    MS-Off Ver
    Excel 2010
    Posts
    98

    Pivot Table Formatting Issue

    I am trying to format parts of a pivot table, but the two lines listed at the bottom keep switching the formatting back to default, which I do not want. I am hoping someone knows of a switch I can throw to put things back.

    This is a code snippet of the area with the problem. The whole code segment is huge (over two hundred pages printed out) and works fine.
    Please Login or Register  to view this content.
    at .ColumnGrand = True it removes all the formatting performed by the previous two subroutine calls. It does the same for .RowGrand, but I expect the problems are related.



    These are the subroutines called from above.
    Please Login or Register  to view this content.
    I know it's not clean, but it is still a work in progress at this point.

    EDIT: And before anyone asks why I don't just move the offending lines to before the formatting, because every time it re-sorts the table, it also removed the formatting, so these two lines need to be fixed.
    Last edited by Phixer; 10-16-2015 at 09:01 AM.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Pivot Table Formatting Issue

    pivot table has a PreserveFormatting property you need to set to True and you should set the number format for the field not the cells. 200 pages of code...wow

    your font formatting may change if you sort because it is applied to cells not the pivot field but you can use the pivottableupdate event to call your formatting code
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    04-10-2014
    Location
    Tallahassee, FL
    MS-Off Ver
    Excel 2010
    Posts
    98

    Re: Pivot Table Formatting Issue

    Quote Originally Posted by JosephP View Post
    pivot table has a PreserveFormatting property you need to set to True and you should set the number format for the field not the cells. 200 pages of code...wow
    I have PreserveFormatting set to True (on all the pivot tables, actually, because of everything being done to them), but was wondering if another toggle or switch somewhere will keep things stuck. Something esoteric that I might have overlooked.


    And, yes, it is a lot of code. They hired me to automate a very complicated process because doing it manually was producing too many errors. Managed to improve time efficiency by 2-50 (depending on activity) and eliminate all errors from non-manual data entry.

    Then they started adding more stuff in, now that they have time for it, such that I am never going to finish this. 244 pages of code and counting.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 09-04-2015, 02:47 AM
  2. Pivot table issue, I'm not able to capture new data, when table is updated
    By johnnyq113 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-26-2015, 05:01 PM
  3. Issue with formatting pivot table
    By Blackhawks in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-10-2014, 11:54 PM
  4. Pivot Table Column/Formatting Issue
    By cartica in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 08-20-2013, 01:41 PM
  5. Excel for Mac Pivot Table Formatting Issue
    By semantics in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 03-28-2013, 02:34 PM
  6. [SOLVED] Pivot Table Conditional Formatting VBA Issue
    By cyberwolf in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-26-2012, 01:10 PM
  7. Replies: 0
    Last Post: 07-22-2005, 11:05 AM

Tags for this Thread

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