LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Update Chart Source Data

Typo

Looks like your X/category values are in 'Approval Index'!A1:A#

should be
Looks like your X/category values are in 'Approval Index'!A2:A#

Peter T

"Peter T" <peter_t@discussions wrote in message
...
You can make your Series update without code using a 'Dynamic Range Name'

Looks like your X/category values are in 'Approval Index'!A1:A#
Series1-Y values offset in col-E
Series2-Y values offset in Col-G
where # is the value in A1.

Define the following names,

myCat =OFFSET('Approval Index'!$A$1,1,0,'Approval Index'!$A$1-1)
mySeries1 =OFFSET(myCat,,4)
mySeries2 =OFFSET(myCat,,6)

If A1 is not on 'Approval Index' change the sheet name accordingly

Change your Series1 & 2 formulas to
=SERIES(,Book1.xls!myCat,Book1.xls!mySeries1,1)
=SERIES(,Book1.xls!myCat,Book1.xls!mySeries2,2)

Change the workbook name to suit

Regards,
Peter T


"iamnu" wrote in message
...
I used the "Record Macro" function to get the code shown below. When
I recorded the macro, the value of A1 was 392. But when I actually
ran the macro, the value of A1 was 393. As you can see, the "Record
Macro" function "hard coded" the value of 392.

How can I make this work such that the SeriesCollection is updated
with the CURRENT value of A1?

Sheets("Chart2").Select
Range("A1").Select
Selection.Copy
Sheets("Chart1").Select
ActiveChart.PlotArea.Select
Application.CutCopyMode = False
ActiveChart.SeriesCollection(1).XValues = "='Approval Index'!
R2C1:R392C1"
ActiveChart.SeriesCollection(1).Values = "='Approval Index'!
R2C5:R392C5"
ActiveChart.SeriesCollection(2).XValues = "='Approval Index'!
R2C1:R392C1"
ActiveChart.SeriesCollection(2).Values = "='Approval Index'!
R2C7:R392C7"
Sheets("Data Input").Select
Range("A13").Select

Thanks for your help...





 
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
VBA to update Chart Source Data Rage on Multiple Charts MikeZz Excel Programming 1 February 6th 07 06:15 PM
Excel 2007 - How do I quickly update a chart using Source data? SWODoug Charts and Charting in Excel 2 June 12th 06 09:31 PM
Update a chart immediately after inputting data into data source MELMEL Charts and Charting in Excel 1 December 1st 05 09:34 PM
Chart/Source Data update problem Rich Charts and Charting in Excel 1 July 4th 05 04:35 PM
How do I automatically update chart source data links for moved fi Suzuki7 Charts and Charting in Excel 2 February 15th 05 03:55 AM


All times are GMT +1. The time now is 12:38 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"