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: 96
Default VBA for plotting charts: Question re-worded

have the following spreadsheet:

A B C D
1 Date Amt Spent Cumm Amt Budget
2 1/10 100 100 1000
3 1/20 50 150 1000
4 1/30 75 225 1000
5 2/10 100 325 1000

Where Budget (Column D) will always be the same value, and Column C is the
cummulative value of B. I am desperately trying to create a macro where it
will line plot column C & D against column A.The trick is that
sometimes there are 5 rows, sometimes there are 16, sometimes there are 20
etc etc etc.

I think I am close as follows:

Sub Macro17()
'
' Macro17 Macro
' Macro recorded 5/2/2005 by
'
Dim NoRows As Integer

'
Charts.Add
ActiveChart.ChartType = xlLine
NoRows = Cells(Rows.Count, "M").End(xlUp).Row
ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range("O4:O" &
NoRows) PlotBy _
:=xlColumns
ActiveChart.SeriesCollection(1).Name = "=""Budget"""
ActiveChart.Location Whe=xlLocationAsObject, Name:="Sheet1"
ActiveChart.HasDataTable = False
End Sub

But the Dim Statement & SetSourseData lines are incorrect. I was just tring
to plot one first - then a second series - any help would be greatly
appreciated.
 
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
XY Charts - not plotting zero or #N/A Points paulch Charts and Charting in Excel 2 August 3rd 09 03:16 PM
How do I keep zero values from plotting in charts? BrianBrand Charts and Charting in Excel 6 January 2nd 07 09:46 AM
plotting charts enyaw Charts and Charting in Excel 1 October 19th 06 10:48 AM
Plotting in Charts [email protected] Excel Discussion (Misc queries) 1 September 13th 06 09:01 PM
Plotting charts Atogeniqua Charts and Charting in Excel 3 July 19th 05 11:09 AM


All times are GMT +1. The time now is 08:48 AM.

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

About Us

"It's about Microsoft Excel"