Hi Everyone,
I'm trying to figure out how to have my vba perform a task and then repeat that same task for the next filter within a pivot table. It's a little complicated, so I'll try my best to explain it then show you the code I came up with.
So I have two documents. Doc1 has a pivot table that I want to extract information from and Doc2 is where I want to place that information.
Here are the steps I'd like to perform:
1. Start in Doc1 while looking at Pivot table. Select an Item No. (Filter) so only one is showing. Copy that Item No.
2. Click the already open Doc2 document. Ctrl + F and paste so you can find item number. While staying in that row, select the respective cell in the "N" column.
3. Go to Doc1 and select cell B4. Ctrl + Shift + Down and copy that data.
4. Go back to Doc2 and Transpose Paste that data in the already selected N cell.
*5. Repeat for the next Item No. on the pivot table (So it cycles through all filters until it's done).
I hope that was relatively easy to understand. Here is my code:
I've been looking online through the forums, and experimenting with a lot codes, but I haven't been successful. Granted I'm not that well versed and I haven't worked on VBAs in a couple of months.Please Login or Register to view this content.
I'm open to any help. Thank you!
Bookmarks