+ Reply to Thread
Results 1 to 14 of 14

copy pivot table values and formatting only

  1. #1
    Registered User
    Join Date
    11-11-2008
    Location
    Syracuse NY
    MS-Off Ver
    2007
    Posts
    90

    copy pivot table values and formatting only

    Hello,

    In Excel 2007, is it possible to copy & paste a pivot table, and have the result look like a pivot table, but not actually be a pivot table? I want to keep the values and the formatting (the colors and borders, etc) but I want it to not actually be linked to the data or have the ability to change with dropdowns, etc. I've tried the usual copy & paste special (values) thing, and the other otions in the paste special box, but it doesn't keep the formatting.

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: copy pivot table values and formatting only

    Just use a straight Copy & Paste.

    Excel will paste the values and formats, including the style of the Pivot Table.

  3. #3
    Registered User
    Join Date
    11-11-2008
    Location
    Syracuse NY
    MS-Off Ver
    2007
    Posts
    90

    Re: copy pivot table values and formatting only

    No, the result of that is an actual working pivot table, which I do not want. I only want it to look like a pivot table.

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: copy pivot table values and formatting only

    capture it as an image perhaps?
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  5. #5
    Registered User
    Join Date
    11-11-2008
    Location
    Syracuse NY
    MS-Off Ver
    2007
    Posts
    90

    Re: copy pivot table values and formatting only

    I tried that too, but the result is a rather lousy quality image, and then then people can't use the data in calculations.

    The simple method of copy -> paste special (values) -> paste special (formats) worked fine in excel 2003, but now that 2007 uses pivot table styles, I can't figure out how to copy them.

  6. #6
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: copy pivot table values and formatting only

    No, the result of that is an actual working pivot table, which I do not want. I only want it to look like a pivot table.

    The simple method of copy -> paste special (values) -> paste special (formats) worked fine in excel 2003, but now that 2007 uses pivot table styles, I can't figure out how to copy them.
    In Excel 2007 that is true. I was using a workbook (97-2003) in compatibility mode.

    However, in a fresh 2007 workbook after creating a PT and applying a style, I did a Copy and Paste Special Values, followed by Formats and then saved and closed the workbook. The format was unchanged when I re-opened the file.

    When is the formatting lost in your process?

  7. #7
    Registered User
    Join Date
    11-11-2008
    Location
    Syracuse NY
    MS-Off Ver
    2007
    Posts
    90

    Re: copy pivot table values and formatting only

    In recreating your actions several different ways, I figured it out, at least partly, so thank you Palmetto for helping me with that.

    Copy -> paste special (values) -> paste special (formats) works in 2007 as long as only the pivot table is selected. If I try to copy the pivot table plus any cells outside the pivot table, then the paste special (formats) doesn't work. So if I was trying to copy only a pivot table, the problem would be solved.

    However, I'm sometimes trying to copy a whole sheet, only part of which is a pivot table. I can copy the whole thing and paste special (values), but then I have to go back and copy only the pivot table and paste the formats in the correct place on the destination sheet. And sometimes there is more than one pivot table on a sheet.

    How would I do that part in a macro - for each pivot table on sheet, select only the pivot table, copy it, and paste the formats in the same place on the destination sheet? The pivot tables could of course vary in location and size.

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430

    Re: copy pivot table values and formatting only

    For individual PT's

    Please Login or Register  to view this content.
    Change sheet references to suit.
    Cheers
    Andy
    www.andypope.info

  9. #9
    Registered User
    Join Date
    11-11-2008
    Location
    Syracuse NY
    MS-Off Ver
    2007
    Posts
    90

    Re: copy pivot table values and formatting only

    I just had time to get back to this... If anyone's interested, I got it to work:

    Please Login or Register  to view this content.
    It looks a bit redundant, but the redundancy is necessary to copy all formats both inside and outside of pivot tables on a sheet that has both. Thanks to all who helped!

  10. #10
    Registered User
    Join Date
    11-16-2009
    Location
    canada
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: copy pivot table values and formatting only

    I tried this code, but it doesn't seem to work for me. The formatting of the pivot table is not retained. Any suggestions. Tks

  11. #11
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: copy pivot table values and formatting only

    WelcomeYour post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  12. #12
    Registered User
    Join Date
    07-23-2010
    Location
    Bangalore
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: copy pivot table values and formatting only

    In Excel 2007:

    1.. copy the exact range of the pivot from beginning to end
    2. copy and paste special values
    3. open clipboard
    4. just click on the latest copy instance once - this copies the pivot formats as it is on top of the values you just pasted
    5. but the drawback is you cant copy and paste at the same place as the original pivot. for that you need to do the above steps, then move the pivot to another location, and then copy and paste back the values with the new formatting just done

    regards
    Ravi.

  13. #13
    Registered User
    Join Date
    04-03-2012
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: copy pivot table values and formatting only

    That code works great if there isn't a filter on the pivot table; however, it doesn't seem to work if there is a filter in the pivot table. I think it has to do with the fact that the table has multiple ranges when there's a filter. Any ideas on how to get it to work when there's a filter in the pivot?

  14. #14
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: copy pivot table values and formatting only

    gtdean11,

    Welcome to the Forum, unfortunately:

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread. It makes sense to have a new thread for your question because a thread with numerous replies can be off putting & difficult to pick out relevant replies.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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