+ Reply to Thread
Results 1 to 7 of 7

Cant format correctly a Pivottable

  1. #1
    Registered User
    Join Date
    11-20-2012
    Location
    Amsterdam, NLD
    MS-Off Ver
    Excel 2010
    Posts
    11

    Lightbulb Cant format correctly a Pivottable

    Hi,

    I'm struggling to format my Pivottable the way I want. Eventually it should look like a quote but the problem is that formatting the subrow header of the table also changes one of the columns.

    It's most likely easier to understand with a picture
    Here is what I have at the moment : Untitled.png
    Here is what I want : Untitled1.png

    This is a sample Excel file : Formatting PivotTable.xlsx

    It is so simple, I can't believe it is a bug of Excel!

    Thanks in advance for the help.

  2. #2
    Registered User
    Join Date
    02-04-2014
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Cant format correctly a Pivottable

    Please check the attached with required formating
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    11-20-2012
    Location
    Amsterdam, NLD
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Cant format correctly a Pivottable

    Thank you for your answer KrisSquare. It does the trick however I obvisouly forgot to specify an important element

    I'm generating the PivotTable "on the fly" via VBA and the size of the table is not fixed.
    It is thus not possible to customize it by hand : I need to define a PivotTable style that works all the time (and eases the reading of the table).

    Any idea? Even with VBA?

  4. #4
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Cant format correctly a Pivottable

    I do not think this is possible with only pivot table style.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  5. #5
    Registered User
    Join Date
    11-20-2012
    Location
    Amsterdam, NLD
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Cant format correctly a Pivottable

    Thanks for the answer.

    It should be possible to loop through the rows of the PivotTable and check if the source name is "Area".
    If yes, then change the color of the row.

    I'm at the moment struggling translating that in VBA. Any help is welcome!

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,236

    Re: Cant format correctly a Pivottable

    It sounds like you need a Dynamic Named Range for the data and then base the Pivot Table off this named range..??

    http://www.bettersolutions.com/excel...G820716330.htm or
    http://www.myonlinetraininghub.com/e...c-named-ranges
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  7. #7
    Registered User
    Join Date
    11-20-2012
    Location
    Amsterdam, NLD
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Cant format correctly a Pivottable

    Okay...

    Although it is not completely tested, I think I finally found a very simple solution (colors are to be changed) :

    Please Login or Register  to view this content.
    Thanks for the support!

+ 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. Looking for a help with format of the PivotTable
    By i82 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 12-06-2012, 03:23 AM
  2. Correctly format UK Postcode
    By MikeWaring in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-24-2010, 05:57 AM
  3. Using vb to Correctly format sentances
    By flebber in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-02-2010, 06:13 AM
  4. Format a PivotTable using VBA
    By PingPing in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-01-2010, 07:57 AM
  5. how can i do a conditional format in a PivotTable?
    By Hector in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-06-2006, 01:55 PM

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