+ Reply to Thread
Results 1 to 3 of 3

XY Scatter Plot Data Series Additions within a loop

  1. #1
    Registered User
    Join Date
    08-09-2011
    Location
    Wilmington, DE
    MS-Off Ver
    Excel 2003
    Posts
    2

    XY Scatter Plot Data Series Additions within a loop

    Hi,

    I am trying to create an XY Scatter Plot within Excel 2003 that has 5 series of data on it. My data exists in two columns (A and B) on the spreadsheet. There is an unspecified number of rows of data within each data set, and each set of data is located 8 rows down from the end of the previous data set (all within columns A and B). Because the number of rows in each data set is variable, I can't simply create a loop that selects a pre-determined number of rows.

    To solve this issue, I created a Do While loop that uses the End(xlDown) function. The code I wrote to graph the data can properly plot one range when the code is located outside of the loop, but once placed inside the loop, running the maco simply creates a spreadsheet with no data plotted.

    My issue is with the data series creation - the data is not being properly placed on the chart created within the workbook. Does anyone see an error/mistake in this code?

    I am new to writing Excel Macros, so please forgive any seemingly simple errors I have made.

    Thank you for the help.

    My code is below, and I have attached the spreadsheet.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,485

    Re: XY Scatter Plot Data Series Additions within a loop

    This works with your data layout,

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    08-09-2011
    Location
    Wilmington, DE
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: XY Scatter Plot Data Series Additions within a loop

    Hi Andy,

    This worked perfectly - thank you for the help! This was exactly what I was looking for.

    Thank you,

    Justin

+ Reply to Thread

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