Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Discontinuous Data Source for Chart?

For some reason my code keeps grabbing my entire block of data instead of the
last 6 rows. I have captured the cell addresses in variables and am trying
to capture the new ranges of data in the syntax for the chart. Not sure
where my problem resides. My data will expand by one row every week. The
headings are in cell B20 and C20. The chart code is not grabbing
discontinuous data but all 24 rows when I only want the heading row plus 6
rows of data.
Here is my code:

Set rngBurndownData = shtTotalData.Range("$A20").CurrentRegion
DateAddress = Cells(Rows.Count, "A").End(xlUp).Address
shtTotalData.Range(DateAddress).Select
ActiveCell.Offset(0, 2).Select
LastRngCell = ActiveCell.Address 'bottom right hand range cell in last
column
ActiveCell.Offset(-5, -2).Select
AcolDateAddr = ActiveCell.Address 'first cell in range A column

Charts.Add
ActiveChart.ChartType = xlColumnStacked

ActiveChart.SetSourceData Source:=Sheets("Total Data").Range( _
"$A$20:$C$20", AcolDateAddr & ":" & LastRngCell), PlotBy:=xlColumns

ActiveChart.Location Whe=xlLocationAsNewSheet

Any help is greatly appreciated!
Reply
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
how do I show a discontinuous chart axis SamR Charts and Charting in Excel 1 April 21st 10 09:27 PM
How to make a chart with selective (discontinuous) data? Making grapg from discontinuous data Charts and Charting in Excel 1 August 26th 08 12:26 PM
pie chart & column chart w/same source data martymi Charts and Charting in Excel 2 May 1st 07 04:25 PM
How do you link chart source data when you copy the chart? mamagirl Charts and Charting in Excel 1 December 8th 06 02:40 AM
Discontinuous lines in series due to gaps in data points Boon8888 Charts and Charting in Excel 2 March 27th 06 06:52 PM


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

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"