+ Reply to Thread
Results 1 to 6 of 6

Vba code to compile specific details from different excel file to one file from folder

  1. #1
    Registered User
    Join Date
    09-25-2015
    Location
    India
    MS-Off Ver
    2013
    Posts
    88

    Vba code to compile specific details from different excel file to one file from folder

    Hello experts,

    There are around 300 excel files and kept on my desktop on specific folder all 300 excel file having Proforma Invoice sheet, from these Proforma Invoice sheet i want to pull specific information to this excel file in sheet1.In sheet1 in column A i want Cell A10 value and In column B i want Cell A18 value and in Column C
    I want Cell E12 value and in column D i want Cell G46 value from all 300 excel files.

    Please find the attached file where i need data from different files

    Regards,
    upa
    Attached Files Attached Files

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Vba code to compile specific details from different excel file to one file from folder

    You can do this really quickly and easily with Power Query.

    The following query returns all files in your folder, as a table, and applies a function query for each column returned:
    Please Login or Register  to view this content.
    The four function queries, to return your four columns are identical, apart from the cell referenced. Name them consistently with the function names used in the CombineFromFolder query.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Example workbook attached - just change the folder path in the CombineFromFolder query, then refresh. To update, simply refresh the query.
    Attached Files Attached Files
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    09-25-2015
    Location
    India
    MS-Off Ver
    2013
    Posts
    88

    Re: Vba code to compile specific details from different excel file to one file from folder

    Hi Olly,

    Thanks for the reply!

    Actually i do not have power query install on my system.

    Is it possible by macro.

    I am using below code but it is not working.

    Please Login or Register  to view this content.
    Regards,

    upa
    Last edited by UPA; 05-25-2017 at 01:54 AM. Reason: edit

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Vba code to compile specific details from different excel file to one file from folder

    I'd recommend installing Power Query, and learning the basics. It's SO MUCH better than VBA for doing this kind of data processing.

    However - here's a VBA solution. It will be much slower than the Power Query version:

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    09-25-2015
    Location
    India
    MS-Off Ver
    2013
    Posts
    88

    Re: Vba code to compile specific details from different excel file to one file from folder

    Hi Olly,

    Thank you for your reply - much appreciated.

    thanks so much for all your hard work and efforts in producing this VBA code - it's amazing and it works very well.

  6. #6
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Vba code to compile specific details from different excel file to one file from folder

    Happy to help. If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. You can also Add Reputation to those who helped you. Thanks.

+ 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. Saving file to folder using cell details
    By deefield in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-30-2016, 05:18 PM
  2. Replies: 2
    Last Post: 12-29-2015, 04:19 AM
  3. extracting folder & file details in excel
    By Navin Agrawal in forum Excel General
    Replies: 1
    Last Post: 01-16-2015, 11:51 AM
  4. [SOLVED] Auto hyperlink file from specific folder after enter file name in cell
    By satputenandkumar0 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-12-2014, 06:11 AM
  5. Create folder, excel file, pdf file, clear details macro
    By cemartinho in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-16-2013, 08:52 AM
  6. List of file names & details in a folder
    By Navin Agrawal in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-04-2012, 04:02 AM
  7. [SOLVED] a macro to show all file details existing in a folder.
    By abhay_547 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-03-2010, 09:59 AM

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