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: 1
Default XValues with variable end row


I am having trouble determining the best way to code the x-axis for my
chart. The beginning of the x axis will always be located in cell H2.
The end of the range will be in column H and some row which is declared
as variable "LastRow". I have tried multiple formats for declaring
this range.

I have attempted to resolve this by using multiple formats as well as
using an XY scatter plot. The y values for the multiple signals are
selected using shift end right and shift end down (from cell "J1").
This has proven to be a robust way to select all of my data for
graphing but I can't seem to get the appropriate x-axis (time scale) on
my graph.


Code:
--------------------
Range("J1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Charts.Add
ActiveChart.ChartType = xlLine
--------------------


I have tried the following methods to format x axis (as well as many
others).


Code:
--------------------
ActiveChart.SeriesCollection(1).XValues = "=RunData!R2C8:R & LastRowC8"

ActiveChart.SeriesCollection(1).XValues = Worksheets("RunData").Range(Cells(2, 8), Cells(LastRow, 8))
--------------------


This is my first post and have found the archive to be quite usefull on
many occations. I love this website! Any help from the Excel masters
will be greatly appreciated!


--
BStanton
------------------------------------------------------------------------
BStanton's Profile: http://www.excelforum.com/member.php...o&userid=19220
View this thread: http://www.excelforum.com/showthread...hreadid=375662

 
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
.Values / .XValues modification baconcow Excel Discussion (Misc queries) 4 September 29th 08 11:06 PM
.XValues syntax problem JF_01 Charts and Charting in Excel 1 December 19th 05 08:21 PM
Unable to set the XValues Property Ali Baba Charts and Charting in Excel 2 September 14th 05 04:54 AM
XValues and values. y Excel Programming 3 April 10th 04 03:13 AM
Displaying XValues. y Excel Programming 2 April 9th 04 07:27 PM


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