+ Reply to Thread
Results 1 to 3 of 3

Pivot Table Headers Showing Up On Pages Without Data

  1. #1
    Registered User
    Join Date
    06-03-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    3

    Pivot Table Headers Showing Up On Pages Without Data

    I have a large file that contains a dashboard on one sheet, a pivot table with data on a second sheet and a graph on a third sheet. I have a slicer that I use to pick the name of a person and the dashboard, pivot table and graph will all display data for that individual person. I have a print macro that combines these three sheets into a pdf stored in a specific folder. Normally, the printing to pdf adjust to the size of the pivot table. For example if I print a file for a person with lots of data it gets longer or if I print a file for a person with little data the pivot data gets shorter.

    I just added a column of data to the pivot table and now the pivot table does not adjust to the amount of data for the person I select. The data is still correct, but if a person has less data that another person, extra pages with the pivot table headers appear (see attachment). There is nothing in the cells below the last line of data. When I hit "select entire pivot table" excel highlights all the data and the first column header, but not the additional headers and pages below.

    I wish I could post the excel file, but it had healthcare data that I can't post online. Images of the macros are attached. Thanks.
    Attached Images Attached Images

  2. #2
    Registered User
    Join Date
    06-03-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    3

    Re: Pivot Table Headers Showing Up On Pages Without Data

    Here is the second macro

    Macro2.jpg

  3. #3
    Registered User
    Join Date
    06-03-2015
    Location
    USA
    MS-Off Ver
    2010
    Posts
    3

    Re: Pivot Table Headers Showing Up On Pages Without Data

    This worked:

    To reset the LastCell of a worksheet, select a cell that is one down and one right to the one you want to be the absolute extents of your worksheet (e.g. all the way down and right). For example, if you want Z99 as the new Last Cell, select AA100. Next, walk through these steps to completely remove extraneous information,
    Press CTRL+Shift+<right arrow>. Release and press CTRL+<spacebar>. Release and press ALT+E then D or right click the highlighted columns and select Delete.
    Press Home, then press CTRL+Shift+<down arrow>. Release and press Shift+<spacebar>. Release and press ALT+E then D or right click the highlighted rows and select Delete.
    Press CTRL+Home to return to A1. Immediately Save or (if you don't trust your keystrokes) Save As to confirm the new Last Cell position.
    Press CTRL+End and you should be in the Last_Cell (e.g. Z99).
    It might seem like a lot, but it takes a lot more time to type it out here than it does to actually do it.

    Due diligence: There is the potential here to delete a lot of possibly relevant data and/or formulas. Make sure you have a backup copy!

+ 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: 0
    Last Post: 10-01-2014, 05:55 PM
  2. [SOLVED] Pivot Table- Data no longer in table source still showing
    By Smally in forum Excel General
    Replies: 7
    Last Post: 09-10-2014, 11:23 AM
  3. Replies: 20
    Last Post: 05-15-2012, 04:42 AM
  4. [SOLVED] ? Pivot Table from 3 columns of raw data with headers
    By William Elerding in forum Excel General
    Replies: 2
    Last Post: 04-03-2006, 08:15 AM
  5. Replies: 1
    Last Post: 02-03-2005, 12:59 PM

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