• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Macro to Consolidate Workbooks into one work book

SP

New Member
Hello,


Can anyone help me on my issues?


I have to consolidate different work book in to one.


Each work book has one sheet and each sheet should get copied to one workbook.

Maximum number of sheet is 3. I do it every hour can you please let me know if I can get a macro to do this task for me?


Thanks in advance.

SP
 
Hi SP!


Can you please check this post..

http://chandoo.org/forums/topic/how-to-compile-the-excel-file#post-49475

We can modify it according to your requirement..


Regards,

Deb
 
Hello SP.. i hope i have understood ur query correctly.

If names and order are fixed, you can use simple macro recorder and adjust code.

Here is simple recorded macro:

Hope it helps.


Sub Macro2()


'

ActiveWindow.ActivateNext

Sheets(Array("Sheet1", "Sheet1 (2)", "Sheet2", "Sheet3")).Select

Sheets("Sheet3").Activate

Sheets(Array("Sheet1", "Sheet1 (2)", "Sheet2", "Sheet3")).Move Before:=Workbooks _

("Book3").Sheets(1)

End Sub
 
Hello SP...here's a simpler version of the above. Hope that's helpful.


Sheets(Array("Sheet1", "Sheet1 (2)", "Sheet2", "Sheet3")).Move Before:=Workbooks _ ("Book3").Sheets(1)


Cheers!
 
Thanks for all your help...

Now I know how important it is to know macro :-(


I am trying it. I have a macro which has been created by my friends. When I try running this it gives me lots of errors and I don’t know how to fix this . This macro dose the same task as consolidating the data from different workbooks and creates a master file.

Can anyone help me with this?

Regards,
 
Hi, SP!

Consider uploading a sample file (including manual examples of desired output), it'd be very useful for those who read this and might be able to help you. Thank you. Give a look at the green sticky posts at this forums main page for uploading guidelines.

Regards!
 
Hello Sir,


I have the file avilable in

https://www.dropbox.com/s/erkv25hb5ykbymt/PERSO_fmb8.XLS


I use this file to consolidate different workbooks. it work fine.


i see that my master file will have all the desired sheets but will also contine empty work sheets namely sheet1 sheet2 and sheet3. now i want the macro to remove the sheets form the file and save the mater file. Can you please help me on this?


Regards,
 
Back
Top