LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default VBA chart problem

I have a Excel app that is supposed to include a chart. The data
consists of three columns; a month number, a cumulative projected
budget and cumulative actual expenditures

1 2000 1982
2 4000 4023
3 7000 6995
4 8000
5 11000
6 11500

I am trying to make a chart with two series; one will be the projected
budget, the other the actual expenditures. The actual line should
track the projected line for whatever actual data exists then the
projected line should continue through its data points.

This is the code I wrote trying to generate this chart:

Worksheets("PR Cashflow").Activate
Set crt = ActiveSheet.ChartObjects.Add(475, 40, 520, 300)
crt.Chart.ChartType = xlLineMarkersStacked
crt.Chart.PlotBy = xlColumns

With crt.Chart.SeriesCollection.NewSeries
.Values = ActiveSheet.range("AB5:AB13")
.XValues = ActiveSheet.range("AA5:AA13")
End With

With crt.Chart.SeriesCollection.NewSeries
.Values = ActiveSheet.range("AC5:AC8")
.XValues = ActiveSheet.range("AA5:AA13")
End With

Here is the problem I am having: when it adds the second series to the
chart it appears as though the y axis values are getting added so
instead of the first data points being 1,2000 and 1,1982 it looks like
they are 1,2000 and 1,3982

What am I missing here?

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pie chart problem SURGEON1971 Charts and Charting in Excel 2 March 30th 09 01:19 PM
Problem with chart Jesper Excel Worksheet Functions 2 April 1st 08 07:35 PM
Chart problem. Scott Charts and Charting in Excel 2 July 9th 07 06:02 AM
Pie Chart Problem sfar007 Charts and Charting in Excel 0 July 19th 06 03:18 PM
chart problem geepeetee Excel Discussion (Misc queries) 5 May 17th 05 09:49 PM


All times are GMT +1. The time now is 01:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"