Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default Cell references when creating charts

I want to refer to my cell range using
range(cells(row,column),cells(row,column))
as I am running this within a loop. However the only code I can get to work
is the two forms below. Is there another way or can I use the above syntax a
different way to get around this?

Charts.Add
ActiveChart.ChartType = xlXYScatter
ActiveChart.SeriesCollection(1).Values = Sheets("EV3
flow").Range("B10:B446")
ActiveChart.SeriesCollection(1).XValues ="='EV3 depth'!R10C2:R446C2"
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Cell references when creating charts

=range(cells(row,column),cells(row,column)).Addres s(1,1,xlA1,True)

or change xlA1 to xlR1C1

or just
With Worksheets("Sheet1")
set rng = .range(.cells(row,column),.cells(row,column))
End with
ActiveChart.SeriesCollection(1).Values = rng

--
Regards,
Tom Ogilvy



"Laura" wrote:

I want to refer to my cell range using
range(cells(row,column),cells(row,column))
as I am running this within a loop. However the only code I can get to work
is the two forms below. Is there another way or can I use the above syntax a
different way to get around this?

Charts.Add
ActiveChart.ChartType = xlXYScatter
ActiveChart.SeriesCollection(1).Values = Sheets("EV3
flow").Range("B10:B446")
ActiveChart.SeriesCollection(1).XValues ="='EV3 depth'!R10C2:R446C2"

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
convert relative cell references to absolute cell references via amacro? Dave F[_2_] Excel Discussion (Misc queries) 1 May 15th 08 04:43 PM
Creating a chart that displays two cell references as one data po. Carla K Charts and Charting in Excel 1 November 23rd 07 08:51 AM
creating cell references [email protected] Excel Discussion (Misc queries) 3 November 3rd 06 06:18 PM
Auto-increment data source cell references when copying charts Dave Excel Discussion (Misc queries) 2 July 5th 06 07:45 PM
Creating cell references with variable values to use in Vlookup jackebro Excel Discussion (Misc queries) 2 December 14th 05 02:46 PM


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