Pivot Tables by Macro


M

Max2073

Hi

I have a spreadsheet with five sheets and I would like to develop a macro,
if possible that creates the pivot tables that I require.

I only want the pivot table to count. Can anyone give me a code for pivot
table macros

Column A is the Row Area
Column B is the Column Area
Column B is the Data Area

using the same data I then want to create another pivot table with
Column C as the Row Area
Column B is the Column Area
Column B is the Data Area

I would like the pivot tables to be displayed on the same sheet
 
Ad

Advertisements

D

Dave Peterson

If you record one while you do it manually, you'll have your code.

But just a suggestion...

I'd put the pivottable on its own dedicated sheet. Who knows how big the table
can grow if any of the users start to pivot it on different items???
 
Ad

Advertisements

M

Max2073

When I record it manually and run it, I get the following

Run-time error '1004'
AddFields method of Pivot Table class failed and I am unsure how to fix this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top