Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default graph range update from macro

Hi,

I have the following statements in my macro. I need to update the graph
range for a new row, but don't know how to use the rng.row data in the graph
Range section to replace "A2:A27,F2:G27" with something like
"A2:A"rng.row,"F2:G"rng.row. Can someone give me an example?

Dim rng As Range
Set rng = Cells(Rows.Count, 1).End(xlUp)

ActiveChart.SetSourceData Source:=Sheets("Data").Range("A2:A27,F2:G27")

ActiveChart.SeriesCollection(1).XValues = "=Data!R3C1:R27C1"
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
To create an Macro and alco to update an graph Rav Sandhu Excel Discussion (Misc queries) 0 October 16th 07 06:08 PM
Trying to define a range for a graph dynamically within a macro jb Excel Programming 3 March 21st 07 08:36 PM
Macro for Graph - problem with Range Tanya Excel Programming 2 March 3rd 07 09:37 PM
Update a range within a macro using an input box or similar John Excel Programming 12 September 6th 06 12:07 AM


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