I am trying to figure out a methodology to accomplish the following:
I have a series of workbooks (about 80) in a single directory in Excel 2007. I want to take a report that is contained on one of the sheets in each workbook , copy all the rows from A1 thru the top of a pivot table on the sheet, and place the data on a new worksheet for all workbooks in the directory.
Visually
Workbook1 - contains Pivot Report
Workbook2 - contains Pivot Report (possible different size/range of cells than previous)
Workbook3 - contains Pivot Report (also possibly different)...
...etc to Workbook #80 in the same directory.
New WorkbookReport:
contains
range A1..k10 from Workbook 1 (need to figure out location of k10 - only an example)
space
range A1..k50 from Workbook 2 (need to figure out location of k50 - only an example)
space
range A1..K30 from Workbook 3 (need to figure out location of k30 - only an example)
space
etc..down to workbook #80.
Is this possible? I am a novice to VB Programming and have a code snippet to open all the workbooks in the directory, process them, close and move to the next workbook.
My issue is I cant figure out the code to give me the beginning location of each pivot table so I can use that range to copy the cells into the new workbook.
Thanks in advance for any assistance!
Bookmarks