+ Reply to Thread
Results 1 to 4 of 4

Pivot Table: Preserve cell formatting on update not working

  1. #1
    Forum Contributor
    Join Date
    03-09-2014
    Location
    Telford
    MS-Off Ver
    Microsoft 365
    Posts
    101

    Pivot Table: Preserve cell formatting on update not working

    I have a pivot table which auto-updates with a VBA. Each time the pivot updates/refreshes, it doesn't preserve the alignment format (Center) of the the second column (Receive field which contain text "Yes" or "No"). I have tick marked the “Preserve cell formatting on update” in pivot table option but doesn't seem to work. Not sure what I'm doing wrong.

    I am grateful for any and all help. Thank you all in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Pivot Table: Preserve cell formatting on update not working

    Hi,

    I find you have to make sure you select the entire Pivot column using Enable Selection before applying the formatting.

    This is enabled via Pivot Table Analyse/Actions/Select. It was already enabled when I opened your file. So then you need to hover the cursor just under the desired column header until you get the little black down-arrow, after which you can left-click to select the entire Pivot column and then apply your formatting. Highlighting the equivalent worksheet cells does not seem to work, as you've probably already tried.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Pivot Table: Preserve cell formatting on update not working

    This old 2009 thread might offer some help although it seems that there is no automatic way that a refresh will do the trick, you will need to add a macro instruction to reformat. I generally use the Sheet Activate event on the sheet that holds the PT but you could equally add the code to your Workbook RefreshAll

    Please Login or Register  to view this content.
    [/CODE]

    https://www.excelforum.com/excel-for...alignment.html
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Contributor
    Join Date
    03-09-2014
    Location
    Telford
    MS-Off Ver
    Microsoft 365
    Posts
    101

    Re: Pivot Table: Preserve cell formatting on update not working

    Perfect!! That works. Thanks a lot Richard.

+ 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. vba to update pivot table filter not working
    By ray707 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-15-2021, 08:02 AM
  2. Replies: 3
    Last Post: 06-05-2013, 03:17 AM
  3. Macro to copy pivot table as values and preserve all formatting
    By Gary1980 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-28-2012, 09:23 AM
  4. Preserve Pivot Table Formatting
    By jpedges38 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-07-2012, 10:07 AM
  5. Replies: 4
    Last Post: 04-22-2012, 08:14 PM
  6. [SOLVED] Pivot Table - Preserve Formatting
    By Ms MIS in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-18-2005, 08:06 AM
  7. Replies: 1
    Last Post: 04-20-2005, 10:06 AM

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