+ Reply to Thread
Results 1 to 5 of 5

Reduce time in processing multiple excel sheets

  1. #1
    Registered User
    Join Date
    05-01-2013
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    39

    Reduce time in processing multiple excel sheets

    Need a macro, which combines multiple excel sheets (csv format) from different folder and adds the name of the folder in a column of the excel sheet.

    Basically, in path D:\ , i have the following folders
    Maths, physics,Biology, English, French

    Now i would place excel sheets belonging to each folder. The number of excel sheets can vary.
    for the sake of convenience suppose we have 3 excel sheets in each folder.

    Now the macro is to combine all the excel sheets from all the folders into a single excel sheet.
    Problem comes that there is no way to distinguish between the excel sheets once they are combined.
    So which picking up the data from each excel sheet, need to add the text " Math" or "physics" ( depending on the folder from which the excels are extraced) in a column at the end of the sheet.

    Now I have a working macro that does all of the above.
    however, i need to refine the logic or processing speed for this. As the total number of rows, after combining all the sheets can exceed 250000 rows. The current macro takes 20 minutes to process the data and provide output.

    Can you please advise how i can reduce the time or a different logic that can reduce the time when dealing with these many rows of data?



    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    01-28-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Reduce time in processing multiple excel sheets

    Hi,

    Try this, i have done this with sum assumptions.

    Please Login or Register  to view this content.
    Regards,
    Sid
    Last edited by sidduk83; 03-03-2014 at 07:53 AM. Reason: To highlight some point and show it as code

  3. #3
    Registered User
    Join Date
    05-01-2013
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    39

    Re: Reduce time in processing multiple excel sheets

    Getting a compile error: user defined type not defined..

  4. #4
    Registered User
    Join Date
    01-28-2012
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Reduce time in processing multiple excel sheets

    In the VBA IDE, go to Tools > References
    Tick "Microsoft Scripting Runtime" and click OK
    and Run it.

  5. #5
    Registered User
    Join Date
    05-01-2013
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    39

    Re: Reduce time in processing multiple excel sheets

    The code has limits, as mentioned, Im dealing with rows that exceed 250000, would like a macro that can process any number of rows and not specify a limit such as 65554 or so.

    I tried using LastRow = Range("E" & Rows.Count).End(xlUp).Row, but it is giving errors.. please help..

+ 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. Reduce processing time for processing multiple excel sheets
    By rexer231 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-06-2014, 09:25 AM
  2. Reduce processing time for saving excel sheets located in a folder
    By rexer231 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-06-2014, 05:28 AM
  3. Excel - bulk processing disparate spread sheets with common data into 1 table or SS
    By rblackcat in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-29-2013, 08:41 PM
  4. processing data from multiple sheets and making report
    By ahsan79 in forum Excel General
    Replies: 3
    Last Post: 02-21-2012, 07:57 AM
  5. Reduce processing load in Excel
    By Lance Gray in forum Excel General
    Replies: 0
    Last Post: 12-29-2005, 01:30 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