ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VB Chart (https://www.excelbanter.com/excel-programming/413222-re-vbulletin-chart.html)

Jon Peltier

VB Chart
 
You need two series, one with dates in C2:C3, the other with dates in C4:C5.

It won't work to stack the lines, though, if the dates are different. In a
line chart, all series assume the X values of the first series.

To split a range into multiple series, you could try these technique
(adjusted to match your data layout):

http://peltiertech.com/WordPress/200...-chart-series/
http://peltiertech.com/WordPress/200...s-without-vba/

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


wrote in message
...
I have a sheet with the following type of data:

Type Value Date
A $100 01/08
A $200 02/08
B $50 06/07
B $22 05/08

I'm creating a chart and setting the x-axis as Date, the y-axis as
Value and need 2 stacked lines each representing a type.

I set the X as Date

ActiveChart.SeriesCollection(1).XValues = WorkWk.Range("C2", EndStr)

with WorkWk = current worksheet and EndStr being the end of the
column, so C5 in the example above and that resets the y-axis to
Column B. So how would I make the 2 types each its own line on the
graph?

Thanks,
Ilona





All times are GMT +1. The time now is 10:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com