Can I run a macro to create a pivot table?

E

Eqa

Each week I get a report in columns with varying Nos. of rows of info.I would
like to create a macro to automaically create and format a Pivot Table in the
manner in which I would like to see this info. Is this possibleto create a
macro to do this as I seem to come up with errors when I run a macro on a new
report.

Thanking You.
 
R

Roger Govier

Hi

You could just create the Pivot Table once and save your file.
Make the data range a dynamic range rather than fixed cell references.
Each week, you could just paste the new data and append it to the bottom
of your table, or overwrite everything below the header line and Refresh

For more information on Dynamic Ranges (and Pivot Tables), take a look
at Debra Dalgleish's site.
http://www.contextures.com/xlNames01.html#Dynamic

http://www.contextures.com/xlPivot01.html
 
E

Eqa

Thanks Roger

Roger Govier said:
Hi

You could just create the Pivot Table once and save your file.
Make the data range a dynamic range rather than fixed cell references.
Each week, you could just paste the new data and append it to the bottom
of your table, or overwrite everything below the header line and Refresh

For more information on Dynamic Ranges (and Pivot Tables), take a look
at Debra Dalgleish's site.
http://www.contextures.com/xlNames01.html#Dynamic

http://www.contextures.com/xlPivot01.html
 
Top