VBA to copy/paste pivot table data to separate sheet based on specific matching criteria

vikem

New Member
Joined
Sep 2, 2015
Messages
23
Good morning:

I'm looking for help on copying data from a pivot table and pasting them to the appropriate cells on a separate worksheet based on 2 levels of matching criteria.

I've typically been using record macro and basic stuff like populating set values in a range if a cell is blank for example. This particular request is difficult for me as I'm not sure how to have the macro match the "1" and "2" with applicable sub categories i.e. 0-30 DAYS, 31-60 DAYS on sheet "DEF Pivot" with the like data from sheet "DEF Report". If it matches, I'd like the $ amount to copy/paste from "DEF Pivot" to the appropriate place on "DEF Report". Using record macro I can only get it to manually copy/paste things that I specifically select. The layout of "DEF Report" is constant and doesn't change. However, the layout of "DEF Pivot" as the "2" can be in a different column A cell and there can be more or less of those sub categories.

I've linked an image of the two worksheets showing what I'm talking about from a completed already pasted product:
Doc1.jpg


I use Excel 2010 and Windows 7.

Hope this is explained well enough. Thank you.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Forum statistics

Threads
1,224,599
Messages
6,179,828
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top