Results 1 to 5 of 5

Create Sparklines very slow when lots of Sparkline Groups already existed for given launch

Threaded View

  1. #1
    Registered User
    Join Date
    06-17-2014
    Location
    OK
    MS-Off Ver
    2013
    Posts
    4

    Create Sparklines very slow when lots of Sparkline Groups already existed for given launch

    Hello,

    I have an Excel file that I use for some personal projects for which I could really please use some help. The macro will create or delete non-contiguous sparklines; only one worksheet would ever have Sparklines and no other charts are present in the workbook. The data for the sparklines is kept on a different sheet then the sparklines. The quantity of sparklines will vary depending on source data and can be upwards of 10,000+.

    If the xlsb file is launched when no sparklines are exist, then the code to create the sparklines runs upwards of 10 to 30 times faster than if the sparklines had previously existed for a given launch of the file. Removing the sparklines or deleting and recreating the entire Target sheet does not improve the speed, only saving without Sparklines and relaunching.

    The slow performance can have a major impact. For example: ~8,000 Sparklines takes ~55 seconds to execute when running quickly but can take ~1700 seconds if Sparklines were either already present when the file was launched or had previously been created and then removed. Smaller sets of Sparklines would naturally take less time to create but would still suffer from the same difference in the speed at which they are created, i.e. a smaller set of Sparklines might take 1.5 and 20 seconds to execute for the fast and slow executions respectively.

    Sparklines are placed into cells that previously contained numerical results, and the results are Backuped up on a different worksheet as they would be replaced when Sparklines are removed. There are no formulas or conditional formatting in the workbook.

    ToggleSparklines function is triggered from the Target sheet via a button so the Target sheet is active at the time the function is triggered.

    I have spent hrs and hrs trying to figure out this problem, and I have exhausted everything I can think to try. This is my first time submitting a thread so hopefully I am doing it correctly.

    I would really appreciate any possible suggestions. Thank you very much

    NOTE: the sample code has been removed since the code contained in subsequent posts is targeted more at the specific issue.
    Last edited by Misaak; 07-06-2018 at 07:48 AM. Reason: Changes were made to remove unnecessary sample code and refine the thread title once the true nature of the difficulty was understood so that people reviewing the information would not be bogged down

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro in Excel 2016 runs MUCH slower when ANOTHER spreadsheet is open?
    By Ed_Collins in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 09-17-2017, 06:59 PM
  2. [SOLVED] Sparklines - Creating Summary and want to source sparkline data from another table
    By AdamParker in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 09-08-2016, 08:49 AM
  3. [SOLVED] Macro running slower and slower
    By jj4jj in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-07-2016, 10:26 AM
  4. Excel macro getting slower and slower.
    By swoop99 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 06-24-2011, 06:41 AM
  5. macro runs much slower in excel 2007
    By hputhraya in forum Excel General
    Replies: 2
    Last Post: 03-25-2010, 03:54 AM
  6. Embedded Excel macro runs 100X slower
    By JS in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-24-2006, 07:20 PM
  7. [SOLVED] String manipulation in macro runs slower each time ran.
    By Lamination Technology in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-16-2006, 02:00 AM

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