Good day,
I'm working on a macro that will be taking data from some tables and putting it into a table, and then generating a pivot table from that data. Where i am having trouble is getting the pivot cache to accept my references. I have one main problem that I think is giving me a problem.
It is grabbing the data from specific sheets and areas correctly, but the pivot cache is having an issue. I think that the issue here is that I need the range of the data to be flexible. It is defined by two variables (Top1 and Bottom1) to distinguish the x range for this particular set of data. I am having a hard time getting the cache to accept my grammar.
I am not sure now to get it to be variable using the R1C1 formatting, but I am having a tough time getting it to accept it in absolute terms.
Dark Green is setting the ranges in another sheet to cut the right info and place it into my "Pivot Data" sheetPlease Login or Register to view this content.
Red is just pasting and formatting said data into the sheet I want to use to feed my pivot table
black is the portion of the code that is defining the range of the data to be dragged into the pivot. I BELIEVE i need to come up with a way to incorporate this into the rest of my code, but that is only the best way I have come to do this kind of thing so far--recommendations are appreciated
Green is my two thoughts as to how to do this but i keep getting a plethora of errors no matter what i try.
Thanks all,
~Joe
Bookmarks