Creating multiple series chart without hand selecting each dataset

  • First time poster here, but I've checked out the cross posting info and hope am doing it correctly. Please let me know if I'm not doing it the correct way, and I will try my best to correct it. I didn't get any replies in the other forum.


    Original thread link:
    http://www.excelforum.com/exce…tml?p=3377894#post3377894
    Please post replies at the original link, or if you are not registered, let me know and I will post it there and mark both of them solved.


    I've been working in Excel for awhile, but not with such large datasets. I'm starting to learn VBA also, but was looking to do this without it, if possible. After searching google, I don't think it's possible, but maybe you all can help me.


    Is there an easy way to create a chart with multiple series, but not actually put each of the series in manually?


    The problem is that I have 2 columns that I want to plot, but each series could be 1 point or many points. Each series is represented in the example workbook by a letter (j,k,m,n) and then I'd like to plot (3,9) as if it were an (x,y) pair.


    The reason I would like to not select all these by hand is that there are about 100 different series (which I would not put all on the same graph) and I'm going to have to do this on multiple spreadsheets for different data sets.


    Thanks in advance!

    Files

    • Book.xlsx

      (9.03 kB, downloaded 74 times, last: )
  • Re: Creating multiple series chart without hand selecting each dataset


    How do you want to you select the series to put in the same chart?
    What means "I'd like to plot (3,9) "

    Triumph without peril brings no glory: Just try

  • Re: Creating multiple series chart without hand selecting each dataset


    Quote from PCI;681223

    How do you want to you select the series to put in the same chart?
    What means "I'd like to plot (3,9) "


    I'd like to have the chart be a regular graph of x vs y, where the x point is 3 and the y point is 9 (as is displayed in the first row of the attached workbook).


    Does that help?

  • Re: Creating multiple series chart without hand selecting each dataset


    I also thought there was a "series" function, but I'm having trouble finding clear documentation on it. I thought maybe I could use this to select the data?

  • Re: Creating multiple series chart without hand selecting each dataset


    I suppose the first chart "j" is for
    j 3 9
    j 4 4
    j 45 2


    ---> (which I would not put all on the same graph)
    How do you want to make the selection of the series in the chart, are all series in your example to present?

    Triumph without peril brings no glory: Just try

  • Re: Creating multiple series chart without hand selecting each dataset


    I would like all 4 series (j,k,l,m) on the same chart. The line for series "j" would have three points (3,9), (4,4), and (45,2).


    This is just a made-up sample, as I can't upload the actual data.


    I was hoping there was a way to select the series by using a function rather than using the mouse to select the cells on the worksheet by hand.

  • Re: Creating multiple series chart without hand selecting each dataset


    As far I know there is no fucntion, then after macros can be used to help: Assuming every time data is in the place

    Triumph without peril brings no glory: Just try

  • Re: Creating multiple series chart without hand selecting each dataset


    I've written some rough pseudo code, maybe someone can help me turn this into a macro?


    I'm trying to capture x data and y data for each series in an array, so that I can use the SERIES function to graph them.


    Here's the code:


    Code
    1. for each row in column A <> empty
    2. for i=1 to 100
    3. if (row in column A) = i
    4. xsubi=xsubi+B(row) (this needs to be an array that can grow. Do I need to know how big it can possibly get, or is it possible to create this dynamically?)
    5. ysubi=ysubi+C(row) (same as above)
    6. go to next row
    7. end if
    8. end for i
    9. go to next row
    10. end for