Results 1 to 26 of 26

Automatic graph creation - rows and columns irregularity

Threaded View

  1. #1
    Registered User
    Join Date
    12-14-2012
    Location
    Maidstone, England
    MS-Off Ver
    Excel 2010
    Posts
    32

    Automatic graph creation - rows and columns irregularity

    I have inherited some code that sucks in data into various sheets, then displays this by automatically creating graphs by VBA. This uses a predefined column increment in code (I have min, max, mean and SD fields - so every fourth starting from the first 'mean' item), and count defined by the variable 'NCols'.

    Now, everything works but one type of data. This is defined as 'NComp'. So 'NCol' = 'NComp'.

    For some reason, when the number of rows is less than the 'NComp' I get a 'Series Formula is too long' error. But, when I stop/reset the module and look at the sheet, the rows selected are still highlighted and are correct!

    I have looked at this over and over again, and I cannot see any relationship between the number of rows and number of columns (defined in NCol), but when I test by entering a lower number to use for 'NComp'.. boom, code works again, albeit obviously now with a lower number of series. The attached file has everything stripped out bar the working sheet, and the data sheet. All of the code is removed, except the plot function, so hopefully it should be easy to follow

    I am sure someone will put their finger straight on it, but I am pulling my hair out as to why these are mixed up!
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

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