Consolidating reports

pliant

Board Regular
Joined
Jan 8, 2003
Messages
238
I have reports done in Excel sent to be by various locations every month. I'd like to combine all these reports into one large report. Is there an easy way to automate this so that I can just click a button each month for this to happen instead of cut and pasting each one into the large report?
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
ok i got rid of the error message by getting rid of the Workbook.Add around line 13 but still nothing is being copied over from the Workbooks that i am selecting
 
Upvote 0
Okay, please tell me the exact steps you are taking to run the macro.

I looked at the error number "400" and, from what I can tell, Excel is saying it can't open the form (I assume it's the file open form) because it's already open. Does that make sense to you? :confused:
 
Upvote 0
I pasted the code you supplied into Sheet1 of a workbook i have saved as LargeReport.xls after opening the Visual Basic Editor. Went into Excel and ran the macro. Selected rpt1 the report i want pasted into Sheet1. It then asks me to save it so save it as LargeReport.xls. However it is just a blank sheet. Nothing has been copied over from rpt1.xls. :(
 
Upvote 0
pliant said:
I pasted the code you supplied into Sheet1 of a workbook i have saved as LargeReport.xls after opening the Visual Basic Editor. Went into Excel and ran the macro. Selected rpt1 the report i want pasted into Sheet1. It then asks me to save it so save it as LargeReport.xls. However it is just a blank sheet. Nothing has been copied over from rpt1.xls. :(

Okay, try running the macro and select a different file name for the save file name (how about Pliant.xls for now?) when you are prompted to save the file. Confirming, the files you are almagamating are Excel files, right?
 
Upvote 0
I think I may know part of the problem. this line doesn't seem to be working: Workbooks.Open Filename:=Active_File_Name

If i understand correctly this should open up the file that i had selected to copy from but this file is never opened. i'm not sure why. any ideaS?
 
Upvote 0
actually never mind that...i did debug and stepped thorugh it and the file is getting opened...i'm still not sure why the copy doesn't happen then :(
 
Upvote 0
Difficult to troubleshoot this long distance, but here goes (no offense meant here, just want to make sure you're not missing any steps).....

Create a new spreadsheet (let's call it Consolidate.xls. Open the VBA Editor (ALT+F11). In the Project Explorer window (usually top left window), select the VBAProject names Consolidate.xls. From the menu bar at the top, select Insert|Module. Paste my code in the VBA window (usually the window on the right). Close the VBA Editor (ALT+Q). Save Consolidate.xls. Run the macro (ALT+F8, and select the CombineFiles macro). Select one or more files you want to consolidate. When prompted to save your file, type in Pliant.xls.

Does this work?
 
Upvote 0

Forum statistics

Threads
1,216,477
Messages
6,130,880
Members
449,603
Latest member
dizze90

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