Hiya
Just to be clear, in your example would the new Jan-02 column represent a new data series in your chart? Or would it be an extention (another point) for each row?
thanx for the question.
it's not a new data series. it's just another point for each row...
Hey again.
Ok cool. You can use named ranges to automate the chart. What I have below assumes there is no other data in the same rows as what's being charted (it may need to be tweaked otherwise).
Sample view of an example data source:
Say your table pulls dates into row 2 (starting with the Header "Date" in C2. Data for these dates I assume are directly under (C3 contains the word "Data1" for the first data series).
Go to: Insert\Name\Define
Define Date as:
=OFFSET(Sheet1!$D$2,0,0,,COUNTA(Sheet1!$2:$2)-1)
Define "Data1" as:
=OFFSET(Sheet1!$D$3,0,0,,COUNTA(Sheet1!$3:$3)-1)
Now go to the chart and tweak the series to:
=SERIES(,Book1!date,Book1!data,1)
You should be set.
Hope that helps
Adam S.
typo: Series is =SERIES(,Sheet1!date,Sheet1!data1,1)
Re: typo: Series is =SERIES(,Sheet1!date,Sheet1!data1,1)
Cool, that seems to be the perfect solution for my problem... THANK YOU!!!
I defined the date and the data1... afterwards I wrote =series(,sheet1!date,sheet1!data1,1) in the "VALUES:"-field... I got the following error-message:
"The series must contain at least one value in order to create a chart"
What did I wrong???
Thanx again
Lukas Weder
Hey again
You are *this* close!
I suspect the error you received had something do do with one or both of your OFFSET formulas.
I had used:
Define Date as:
=OFFSET(Sheet1!$D$2,0,0,,COUNTA(Sheet1!$2:$2)-1)
Above:D2 represents the cell with the first actual date (I assume you already tweaked "Sheet1!" to the name of your own sheet). If your first date in in G2, modify the formula above to reflect it.
Define "Data1" as:
=OFFSET(Sheet1!$D$3,0,0,,COUNTA(Sheet1!$3:$3)-1)
Same as above: D3 in my example represents the first data1 value (not the variable name-which is assumed to be in cell C3).
I might have accidentally described the cell locations incorrectly the first time around. (I hope not).
Now go to the chart and tweak the series to:
=SERIES(,Sheet1!date,Sheet1!data1,1)
This is the series formula in the chart itself. In my example I've ignored the first argument (for a chart title). The Book1! reference from before reflected the filename I was playing with to verify my answer - excel overwrote my sheet1! refs by itself.
Good luck
Adam S.