Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
.Values / .XValues modification | Excel Discussion (Misc queries) | |||
.XValues syntax problem | Charts and Charting in Excel | |||
Unable to set the XValues Property | Charts and Charting in Excel | |||
XValues and values. | Excel Programming | |||
Displaying XValues. | Excel Programming |