LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Chart Setting Xvalues

Hi All
I am havig some problems when setting the xvalues for a chart. The data is
stored in a named range (data), the xvalues are in the same range (column
1). The problem arises in that the the numer of rows in the range can vary
so the xvalues must also change.
I have overcome the source data by making reference to the range name (see
below) but I have not been able to figure out what I need to do for the
xvalues which are recorded as a R1C1 reference in the following code.

What code do I need to put in to make it universal in relation to my varying
data range?

TIA
Nigel

Charts.Add
ActiveChart.ChartType = xlLine
ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range("data"),
PlotBy:=xlColumns
ActiveChart.SeriesCollection(1).XValues = "=Sheet1!R4C1:R21C1"




----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
 
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
setting XValues property when charting using macros rhsiao Charts and Charting in Excel 3 April 7th 06 04:16 PM
Displaying XValues and Values for chart using VBA Barb Reinhardt Charts and Charting in Excel 2 January 13th 06 01:34 AM
Problem with plotting a chart when using arrays as Values and Xvalues [email protected] Charts and Charting in Excel 3 August 19th 05 09:05 PM
Can't Set XValues for Surface Chart Jack Charts and Charting in Excel 1 March 26th 05 07:06 AM
Problem adding Series XValues to Chart using VBA Sean Curry Charts and Charting in Excel 0 March 14th 05 12:18 AM


All times are GMT +1. The time now is 08:28 AM.

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"