+ Reply to Thread
Results 1 to 11 of 11

Opening a excel file with code takes more than 5 minutes

  1. #1
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,147

    Opening a excel file with code takes more than 5 minutes

    Hello Experts,
    I have this file with 4 modules to derive at the result. The problem is opening the file. It takes more than 5 minutes to open. In the status bar it is showing calculating and extracting 1%, 2% and so on and it is very slow. How do I overcome this.? Please share your suggestions what to do and what could be wrong.
    Last edited by RAJESH SHAH; 02-01-2023 at 05:44 PM. Reason: #Solved

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,223

    Re: Opening a excel file with code takes more than 5 minutes

    I suspect the reason is the number and type of formulae (array entry?) being used. If your last post, you said you had difficulty uploading a 25 row sample so there is obviously something seriously wrong wirh your workbook.

    From your previous posts you have continuously added/amended the code where you have simple used code to insert formulae [when using native VBA would be better]: it is probable/highly likely this has introduced many inefficiences.

    Without a workbook, it is not possible to identify the problem arreas.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,147

    Re: Opening a excel file with code takes more than 5 minutes

    My first stage of the project is completed successfully. It takes less than 3 minutes for the code to give me the result. Opening the file takes much more time than the code.
    As I said my data is very huge up to 1 lakh rows plus. Without the whole data you will not be able to find the reason for the problem. If it is ok I can share a link in private for you to chack. Please let me know.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,223

    Re: Opening a excel file with code takes more than 5 minutes

    Provide details (by sheet) of number of rows/columns, formulae used e.g SUMPRODUCT. It is not necessary to supply a 10.000+ row sampe as it should be possible to identify liklely problem formula.

    Opening the book is obviously resulting in the workbook doing a lot of re-calculating.

    https://www.webnots.com/fix-slow-mic...et-processing/

    https://www.youtube.com/watch?v=nn-KGloaVsA

    and other examples of such advice are on the web.

  5. #5
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,147

    Re: Opening a excel file with code takes more than 5 minutes

    I don't know how it will help you to understand but here goes..

    Sheet 1 data is as received from the client. Rows 1,27,955 and columns 68
    Sheet 2,3,4,5, are the data extracted from sheet1 -
    sheet 2 89,855 rows and columns 68
    sheet 3 20527 rows an columns 26
    sheet 4 7546 rows and columns 68
    sheet 5 362 rows and columns 14 but with some unwanted additional rows still to be recrified

    What if I share the codes will it be possible to check and see what is the problem ?

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,223

    Re: Opening a excel file with code takes more than 5 minutes

    Although large, 128000 rows is not exceptional but performance does depend on what formulas are performed.

    The best way is post a sample file with a few hundred rows BUT include all sheets, together with the VBA code.

  7. #7
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,147

    Re: Opening a excel file with code takes more than 5 minutes

    I am facing another problem. Please let me correct both the issues first and if possible to share all the sheets will do so with less than 100 rows.

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,223

    Re: Opening a excel file with code takes more than 5 minutes

    Thank you.

  9. #9
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,756

    Re: Opening a excel file with code takes more than 5 minutes

    I supplied you with a formula for conditional formatting, and you went on to apply this to a complete column, and complained then that it was slow. That may be one of the reasons that the file is slow to open, so you should minimise the range over which the CF applies.

    Hope this helps.

    Pete

  10. #10
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,147

    Re: Opening a excel file with code takes more than 5 minutes

    Quote Originally Posted by Pete_UK View Post
    I supplied you with a formula for conditional formatting, and you went on to apply this to a complete column, and complained then that it was slow. That may be one of the reasons that the file is slow to open, so you should minimise the range over which the CF applies.

    Hope this helps.

    Pete
    I think you are talking about some other project. There is no conditional formatting in this workbook.

  11. #11
    Forum Contributor
    Join Date
    11-25-2021
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    2,147

    Re: Opening a excel file with code takes more than 5 minutes

    After closing and opening the file multiple times, looks like the problem is resolved. The calculation & threading message has vanished. Will check again tomoorow, If it is working fine I will close the post tomorrow.

+ 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. *.XLS file takes 30 minutes to open
    By electro-89 in forum Excel General
    Replies: 3
    Last Post: 01-19-2015, 09:07 AM
  2. Replies: 3
    Last Post: 01-14-2014, 10:57 AM
  3. Replies: 0
    Last Post: 05-17-2013, 09:21 AM
  4. VBA Code takes 10 minutes of crunch time to return result.
    By jaimeteele in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-28-2013, 02:19 PM
  5. "SAVE" large Excel file takes 1-2 minutes.
    By RICHARD SALMON in forum Excel General
    Replies: 0
    Last Post: 11-28-2012, 12:46 PM
  6. My current macro takes 20 minutes + to run. How can this code be made more efficient??!!
    By Mr.Whiskers in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-11-2012, 11:02 AM
  7. [SOLVED] File takes 40 minutes to load (auto-calculation)
    By R L in forum Excel General
    Replies: 1
    Last Post: 01-26-2005, 07:06 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