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.
Bookmarks