Offset Chart


Posted by Joe Li on November 10, 2000 12:26 PM

In this format,

ActiveChart.SetSourceData Source:=Sheets("Recap").Range("I36:I87,L36:L87"), _
PlotBy:=xlColumns

how do I get the following work?

ActiveChart.SetSourceData Source:=Sheets("Recap").Range("I3:lastrow ,L3:lastrow"), _
PlotBy:=xlColumns




Posted by Ivan Moala on November 11, 2000 4:00 AM


You need to define your last row as;

lastrow = Range("I3").End(xlDown).Address
lastrow = Range("L3").End(xlDown).Address
Then use as;

ActiveChart.SetSourceData Source:=Sheets("Recap").Range("I3:" & lastrow & ",L3:" & lastrow), PlotBy:=xlColumns

Note: not tested !!


Ivan