+ Reply to Thread
Results 1 to 6 of 6

Extract multi excel file into a single file

  1. #1
    Registered User
    Join Date
    07-03-2015
    Location
    Jakarta
    MS-Off Ver
    2010
    Posts
    12

    Extract multi excel file into a single file

    hello, I am trying to extract many profiles & product files into single file.
    on sheet "Merchant" had succeeded but for sheet "Produk" has not been successful.
    here it is my code
    Please Login or Register  to view this content.

    any help would be appreciated
    and here is my files
    Attached Files Attached Files

  2. #2
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: Extract multi excel file into a single file

    Hi saputroa272
    Quote Originally Posted by saputroa272 View Post
    hello, I am trying to extract many profiles & product files into single file.
    on sheet "Merchant" had succeeded but for sheet "Produk" has not been successful.
    here it is my code………
    and here is my files……
    . You need to give us much more information in order for us to help you. It is good that you have given us the code – that is a good start point for us. And you have given us the “Before File” Extract Multifile trial.xlsm . But from the information that you have given we can have no idea what is going wrong as you have not stated clearly exactly how you want the File “Extract Multifile trial.xlsm” to look like after successful running of a code.
    . Please in future provide a second “Extract Multifile trial File” ,( the “After” File ) which you fill in by hand to show exactly what output you want finally after a successful running of a code
    ……..
    . In any case I have made a few guesses as to what you want and rewritten your code so that it consolidates profiles & product files into the File “Extract Multifile trial.xlsm” assuming that “Extract Multifile trial.xlsm” would be empty to begin with:--***
    . - I think your main problem in your original code was in determining your Nextfree2 -
    . a) ***File “Extract Multifile trial.xlsm” appeared to have some data in a long way down in sheet Produk that you may have overlooked
    . b) even when deleting this data your calculation of NextFree2 seemed to give erratic results which I do not yet understand. I had to empty cells which looked empty to get the codes too work. But I am not sure if you intended having this data there?***
    . But I have also simplified greatly your 'copy, paste, whatever stuff” as well. ( Assuming for now you have no empty rows within the data to be consolidated as per your sample data )

    Code:
    Please Login or Register  to view this content.

    Alan Elston
    Bavaria
    Germany
    Last edited by Doc.AElstein; 07-15-2015 at 04:40 AM.
    '_- Google first, like this _ site:ExcelForum.com Gamut
    Use Code Tags: Highlight code; click on the # icon above,
    Post screenshots COPYABLE to a Spredsheet; NOT IMAGES PLEASE
    http://www.excelforum.com/the-water-...ml#post4109080
    https://app.box.com/s/gjpa8mk8ko4vkwcke3ig2w8z2wkfvrtv
    http://excelmatters.com/excel-forums/ ( Scrolll down to bottom )

  3. #3
    Registered User
    Join Date
    07-03-2015
    Location
    Jakarta
    MS-Off Ver
    2010
    Posts
    12

    Re: Extract multi excel file into a single file

    well thanks in advance for the reply doc, it seem your code much shorter than mine I will learn how it works to get my code more efficient. the idea is to copy non blank value (products list)in profile&product workbook sheet"produk" range C3:M200 to extractmultifile workbook sheet"produk" at the first blank cell in B3:B column.It embarasing that i found my self forgotten to write ".value" on sheet"produk" so here is the worked code:
    Please Login or Register  to view this content.
    so it Solved. sorry for my english

  4. #4
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: Extract multi excel file into a single file

    Hi saputroa272
    . Just a quick follow up here as I was working on a similar problem and had horrendous problems in checking for “Empty cells”……

    . 1) Usually .Value would be taken as default if omitted. But interestingly here it leads to your code not working, that is to say NextFree2 seemed to give erratic results which does not appear to be the case with your modified code.
    . A strange problem, but emphasizes as always not too rely on the default and always remember to include .Value….

    . 2) There could still be some problems lurking to catch you out unexpectedly to do with “Empty cells”..
    .. here is another code alternative ( 2 versions ) which my be more appropriate, or at least another alternative to have as a back- up..


    Full code with explaining comments:

    Please Login or Register  to view this content.

    Shortened / Simplified code:

    Please Login or Register  to view this content.

    Alan

  5. #5
    Registered User
    Join Date
    07-03-2015
    Location
    Jakarta
    MS-Off Ver
    2010
    Posts
    12

    Re: Extract multi excel file into a single file

    Hi Doc.AElstein
    1. noted sir
    2. superb, both of them are worked fine. Its good for me as a back- up if i find a problem with “Empty cells”
    thanks a alot

  6. #6
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: Extract multi excel file into a single file

    Quote Originally Posted by saputroa272 View Post
    Hi Doc.AElstein
    1. noted sir
    2. superb, both of them are worked fine. Its good for me as a back- up if i find a problem with “Empty cells”
    thanks a alot
    . You're welcome,
    . Thanks for the feedback.
    . Alan Elston

+ 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. Excel VBA to scan a PDF for keyword and extract PDF Pages to single PDF File
    By Brawnystaff in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-19-2014, 02:00 AM
  2. [SOLVED] Wanted to extract data from a file which is already an excel macro file
    By Raju Radhakrishnan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-11-2013, 11:43 AM
  3. Multi Pages from MSN Money (StockScouter) to One Single Excel File
    By SimonChow in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-19-2013, 04:19 AM
  4. [SOLVED] Extract a few values from several .csv-files and bundle them in a single output-file
    By Jeroen606 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-14-2013, 01:05 AM
  5. How to extract Information from an Excel File and entering those data in a text file?
    By bikash.nitk in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-10-2012, 12:13 PM
  6. convert multi-sheets file to single-sheet files
    By yahata in forum Excel General
    Replies: 3
    Last Post: 04-22-2007, 06:54 AM
  7. [SOLVED] Saving multi-tab excel file created from comma delimited text file
    By Marcus Aurelius in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-19-2005, 01:20 PM

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