Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Need help Utilizing Dynamic ranges for creating charts

Here is my situation. I have to create several charts based on data that may
or may not exist in certain forms. I can program for those variables if I
wasnt using a chart...however my boss wants a chart!!

My specific issue is this:

I can't for the life of me, figure out how to get the values in a chart to
accept anything other than the "Sheet1!R2C1,Sheet1!R2C2" etc etc.

how do I get

"Activechart.SeriesCollection(1).Values = "

to work with dynamic ranges?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Need help Utilizing Dynamic ranges for creating charts

You need to build the string to pass in something like this...

dim MyAddress as String

With Range("MyDynaRange")
MyAddress = .Parent.Name & "!" & .Address
End With

Activechart.SeriesCollection(1).Values = MyAddress
--
HTH...

Jim Thomlinson


"havocdragon" wrote:

Here is my situation. I have to create several charts based on data that may
or may not exist in certain forms. I can program for those variables if I
wasnt using a chart...however my boss wants a chart!!

My specific issue is this:

I can't for the life of me, figure out how to get the values in a chart to
accept anything other than the "Sheet1!R2C1,Sheet1!R2C2" etc etc.

how do I get

"Activechart.SeriesCollection(1).Values = "

to work with dynamic ranges?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Need help Utilizing Dynamic ranges for creating charts

Here's a snippit of code I'm currently using where an existing chart needs
to by updated but the number of series can vary:
-----
Sheets(sheet_name_goes_here).ChartObjects(1).Activ ate
'Set chart's data source
With ActiveChart
.ChartArea.Select
.SetSourceData Source:=Range("Chart_Source_Data"), PlotBy:=xlRows
'Point source to named range
End With
-----
My named range, "Chart_Source_Data", is a dynamic range. Here's a sample of
my range:

........Month..................Jan......Feb.....Ma r
Page Views.............7693....3651...8443
Visits.........................7443....8338...8878

When the dynamic range is dropped into the chart, the Months are the x-axis
and the numbers are the y-axis with the names (Page Views, Visits) the
series name.
--
Toby Erkson
http://www.bidata.net/

"havocdragon" wrote in message
...
Here is my situation. I have to create several charts based on data that
may
or may not exist in certain forms. I can program for those variables if I
wasnt using a chart...however my boss wants a chart!!

My specific issue is this:

I can't for the life of me, figure out how to get the values in a chart to
accept anything other than the "Sheet1!R2C1,Sheet1!R2C2" etc etc.

how do I get

"Activechart.SeriesCollection(1).Values = "

to work with dynamic ranges?



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
Creating dynamic ranges which are named. U0107 Excel Worksheet Functions 1 January 5th 10 11:46 PM
Dynamic cell ranges in charts Harold Christian[_2_] Charts and Charting in Excel 4 February 17th 09 03:25 AM
Dynamic charts without Named Ranges? goofy11 Charts and Charting in Excel 5 December 20th 07 01:31 PM
a question regarding dynamic ranges and charts Wazooli Charts and Charting in Excel 2 March 28th 05 11:25 PM
Dynamic data ranges and Charts Keith Laker Excel Programming 2 December 3rd 03 03:57 PM


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