I have a requirement where I set up three pivot tables created from the same sheet #3. Now the sheet #3 is also getting populated with the data from sheet#1 and #2. every new population of sheet first clearing the data and then populating it with new fresh data. and for that my pivot
table refresh code is not working and giving the error that table columns are not found
even if the data and column is there.I am quite sure that this is happening due to the data clear. So I am wondering to have some way to create such pivot tables
at run time through the script. Is it possible?
UPDATE
I have a data Excel sheet in the below format:
Name Fruits Condition of Fruits
===== ====== ====================
Ram Apple Good
Jadu Apple Bad
Tina Orange Good
Ram Orange Good
Tina Apple Bad
Ram Apple Bad
Output of the Pivot program in the other sheet of the same excel, say in sheet(2) should be like this:
Name Fruits Condition of Fruits
==== ====== ===================
Good Bad Total
==== ===== ======
Ram Apple 1 1 2
Ram Orange 1 0 1
Tina Apple 0 1 1
Tina Orange 1 0 1
jadu Apple 0 1 1
===================================
Grand Total 3 3 6
===================================
The above format needs to be present in the Excel in the sheet(2), whenever sheet(1) will be having source data within it as shown in the first table.
I want Macro program to create using Excel pivot table concept.
Can you suggest any code settings, for the above Pivot creation?
pivot
or acode
. Manage some consistency. Why mix both? – bonCodigo