+ Reply to Thread
Results 1 to 22 of 22

VBA Macro For Creation of Summary File from Workbooks

  1. #1
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Question VBA Macro For Creation of Summary File from Workbooks

    Hi Friends,

    I have different workbooks. and i want to extract some data from these files to one summary file. please find data workbooks, sample summary file and please share workable code (data range from files are mentioned in " Summary File sample" workbook).


    Thank you in advance friends,
    Attached Files Attached Files
    Last edited by structo; 09-14-2016 at 07:42 AM.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: VBA Macro For Creation of Summary File from Workbooks

    Make sure that all workbooks are open. Place this macro in a regular module in the "Summary" file and run it form there.
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Re: VBA Macro For Creation of Summary File from Workbooks

    Quote Originally Posted by Mumps1 View Post
    Make sure that all workbooks are open. Place this macro in a regular module in the "Summary" file and run it form there.
    Dear friend,
    thank you for sharing nice code.i need by without opening all files and with help of selecting by folder by popup box. My folder Location is "D:\Final" (folder name is "Final"). any possibilities?

    kindly arrange small modification.

    Thank you.
    Last edited by structo; 09-14-2016 at 10:42 AM.

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: VBA Macro For Creation of Summary File from Workbooks

    What are the actual names of the files you will be selecting? Will you always be selecting the same 3 files? In other words will you always select File1.xlsx, File2.xlsx and File3.xlsx or will these names change over time?

  5. #5
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Re: VBA Macro For Creation of Summary File from Workbooks

    Friend,
    Those are always same names as File1,File2,File3. but file extensions are ".xlsm". in rare situations i will change those file names.

    Thanks.
    Last edited by structo; 09-14-2016 at 10:50 AM.

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,820

    Re: VBA Macro For Creation of Summary File from Workbooks

    So the file names are File1.xlsm, File2.xlsm and File3.xlsm. Is this correct?

  7. #7
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Re: VBA Macro For Creation of Summary File from Workbooks

    Quote Originally Posted by Mumps1 View Post
    So the file names are File1.xlsm, File2.xlsm and File3.xlsm. Is this correct?
    Yes Friend, Correct.

  8. #8
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: VBA Macro For Creation of Summary File from Workbooks

    Hi structo,

    Excel has a newer tool, starting with 2010 that does what you are asking for. The Add-In is called "Power Query" in 2010 and 2013 and "Get & Transform" in 2016 Excel. If you have the data in your Files in "Tables" this newer tool can be used. See an example at:

    https://support.office.com/en-us/art...c-6279bef08df4 or
    http://whitepages.unlimitedviz.com/2...n-power-query/
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  9. #9
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Re: VBA Macro For Creation of Summary File from Workbooks

    Quote Originally Posted by MarvinP View Post
    Hi structo,

    Excel has a newer tool, starting with 2010
    Sorry Friend, right now i am used 2003 and 2007 versions only.looking for Code.

    Thanks.

  10. #10
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: VBA Macro For Creation of Summary File from Workbooks

    Similar to Mumps1's code, run from a backup copy of the master file with the sheet to fill being active.
    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Cool Re: VBA Macro For Creation of Summary File from Workbooks

    Quote Originally Posted by Kenneth Hobson View Post
    Similar to Mumps1's code, run from a backup copy of the master file with the sheet to fill being active.
    Dear Sir,

    Your code is really marvelous. Thank you for sharing, Thank you all for yours support.

  12. #12
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Re: VBA Macro For Creation of Summary File from Workbooks

    Dear Sir,

    I am facing small problem with formulas. because values are not pasted like a "Paste special" (some times cells contains formulas). what is the modification for paste special?

    Thanks.
    Last edited by structo; 09-15-2016 at 01:57 AM.

  13. #13
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Re: VBA Macro For Creation of Summary File from Workbooks

    Friends,

    How to convert as a Paste special Values Developed (Only Cell values not Formulas)? because pasted as a formulas instead of Cell Values.

    Thanks in Advance.
    Last edited by structo; 09-15-2016 at 01:04 PM.

  14. #14
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: VBA Macro For Creation of Summary File from Workbooks

    Hello structo,

    How to convert as a Paste special Values Developed? because pasted as a formulas instead of Cell Values.
    Do you want to Paste Formulas or Values?

    Regards.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  15. #15
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Re: VBA Macro For Creation of Summary File from Workbooks

    Quote Originally Posted by Winon View Post
    Dear friend, i need Only paste Values (Like a Paste special and Values).


    Thank you friend.
    Last edited by structo; 09-15-2016 at 01:09 PM.

  16. #16
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: VBA Macro For Creation of Summary File from Workbooks

    Thank you for the feedback structo.

    Let us take the Code from Mumps1 as changed by Kenneth Hobson, and try it as follow;

    Please Login or Register  to view this content.
    Regards.

  17. #17
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Re: VBA Macro For Creation of Summary File from Workbooks

    Quote Originally Posted by Winon View Post
    Thank you for the feedback structo.

    Let us take the Code from Mumps1 as changed by Kenneth Hobson, and try it as follow;
    Thank you for Modification Friend,i hope now all values developed as Copy and Paste values.

    I will test and Give Feedback.

    Thank you very much.
    Last edited by structo; 09-15-2016 at 01:34 PM.

  18. #18
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Re: VBA Macro For Creation of Summary File from Workbooks

    Quote Originally Posted by Winon View Post
    Thank you for the feedback structo.

    Let us take the Code from Mumps1 as changed by Kenneth Hobson, and try it as follow;

    Regards.
    Dear friend,

    After running code, from file3 values are not developed in summary file.

    Thanks.

  19. #19
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: VBA Macro For Creation of Summary File from Workbooks

    Sorry structo,

    I seem to have missed a few lines in tweaking the Code. Please try the below now.

    Please Login or Register  to view this content.

  20. #20
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: VBA Macro For Creation of Summary File from Workbooks

    Doing what you want in #15 can be done by PasteSpecial(). If you don't know how, that is what the macro recorder is for. It is your friend.

    Here is the first one with values and number formats as most would want that. I leave it to you to modify the other ranges.
    Please Login or Register  to view this content.
    Use xlPasteValues if that is what you really wanted.

    The other method to transform formulas into values is:
    Please Login or Register  to view this content.

  21. #21
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Re: VBA Macro For Creation of Summary File from Workbooks

    Quote Originally Posted by Winon View Post
    Sorry structo,
    Thank you friend, still not developed full values by your code.please test with my sample files.

    Thanks.
    Last edited by structo; 09-16-2016 at 12:14 PM.

  22. #22
    Forum Contributor
    Join Date
    08-27-2016
    Location
    INDIA
    MS-Off Ver
    2003,2007,2010
    Posts
    134

    Re: VBA Macro For Creation of Summary File from Workbooks

    Quote Originally Posted by Kenneth Hobson View Post

    Use xlPasteValues if that is what you really wanted.

    The other method to transform formulas into values is:
    Thank you sir, i am changed as below code type range and works fine.
    Please Login or Register  to view this content.
    and what is the modification for below Code for Paste Special:
    Please Login or Register  to view this content.
    i am studied below method and very interesting, as per below code how to use? where should i paste?

    Please Login or Register  to view this content.
    During using of code some hang is happened in my excel file, how to minimize? after popup, if i have chooses "Cancel" button still my excel work book mouse cursor is visible like a background process animation and hangs. kindly tweak the code.


    Thank you Sir.
    Last edited by structo; 09-16-2016 at 12:30 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Problems with Summary and Pivot Table creation macro
    By Handyann in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-07-2015, 09:31 AM
  2. Replies: 4
    Last Post: 01-31-2015, 02:19 PM
  3. Replies: 3
    Last Post: 01-05-2013, 02:20 AM
  4. [SOLVED] Macro To Copy Specific cells From Multiple Workbooks to New Summary Workbook
    By Mooseman60 in forum Excel Programming / VBA / Macros
    Replies: 36
    Last Post: 06-19-2012, 07:38 AM
  5. Macro to extract data from various workbooks & paste in seperate summary sheet
    By Poppy23 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-09-2011, 11:41 AM
  6. Excel file creation dates do not match the windows creation date.
    By alexthapyro in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-26-2011, 12:14 PM
  7. Macro/VBA Email & File creation
    By shane.albrandt in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-05-2010, 05:50 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1