Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default X-axis variable reference

Hi! I am having trouble with constructing an x-axis in my macro for excel.
since the x-axis changes all the time I want to have a dynamic reference. The
code now is:

ActiveChart.SeriesCollection(1).XValues = rng1.Address rng1.Offset(i,
0).Address

As you can see the right hand side is incorrect. However I do not know how
to refer to the cells. Please help me out on this one!!!!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default X-axis variable reference

ActiveChart.SeriesCollection(1).XValues = rng1.parent.Range(rng1, _
rng1.Offset(i,0)).Address(1,1,xlA1,True)

--
Regards,
Tom Ogilvy



"april27" wrote:

Hi! I am having trouble with constructing an x-axis in my macro for excel.
since the x-axis changes all the time I want to have a dynamic reference. The
code now is:

ActiveChart.SeriesCollection(1).XValues = rng1.Address rng1.Offset(i,
0).Address

As you can see the right hand side is incorrect. However I do not know how
to refer to the cells. Please help me out on this one!!!!

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
Variable Axis Length Krys Charts and Charting in Excel 2 July 1st 08 08:19 PM
Using a cell reference as the axis value for Horizontal axis crosses [email protected] Charts and Charting in Excel 4 January 25th 08 01:59 PM
How do I reference x-axis or y-axis scale values to a worksheet ce retro5726 Excel Discussion (Misc queries) 0 August 10th 06 01:46 AM
How do I set Line chart y Axis variable X axis value? John T Charts and Charting in Excel 1 April 18th 05 04:36 AM
Using Right Hand Y Axis For An Additional Variable: How ? Robert11 Charts and Charting in Excel 1 January 17th 05 01:39 PM


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