Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Set Xvalues to an array of date, but the x-scale not correct
Tom, thanks for suggestion (using CLng).
yes, your sub-routine shows a curve with x-scale like this: p1----p2----p3----p4 however, what i want the x-scale is, like this: p1---p2-------p3---------------p4 *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Set Xvalues to an array of date, but the x-scale not correct
To the best of my knowledge, that isn't supported. (although you claimed
you achieved what you want manually) Perhaps you want to use a logarithmic scale. -- Regards, Tom Ogilvy Alan Pong <no_spam_please wrote in message ... Tom, thanks for suggestion (using CLng). yes, your sub-routine shows a curve with x-scale like this: p1----p2----p3----p4 however, what i want the x-scale is, like this: p1---p2-------p3---------------p4 *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Set Xvalues to an array of date, but the x-scale not correct
Tom, i get it by using Range:
A B 1 date price 2 2003/12/05 0.93 3 2008/09/03 3.26 4 2013/09/02 4.35 5 2033/08/28 5.21 Sub test() Dim r As Range Set r = Range("a2:a5") 'if the cells need change later. 'r.Item(1, 1) = CDate("2003/12/5") 'r.Item(2, 1) = CDate("2008/9/3") 'r.Item(3, 1) = CDate("2013/9/2") 'r.Item(4, 1) = CDate("2033/8/28") ActiveSheet.ChartObjects(1).Chart.SeriesCollection (1).XValues = r ActiveSheet.ChartObjects(1).Chart.Axes(xlCategory, xlPrimary). _ TickLabels.NumberFormat = "mm/dd/yy" b = Array(0.93, 3.26, 4.35, 5.21) ActiveSheet.ChartObjects(1).Chart.SeriesCollection (1).Values = b End Sub --END *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Date(Year,Month,Day) not returnign correct date | Excel Discussion (Misc queries) | |||
Clipart will not scale with array of cells | New Users to Excel | |||
Array formula correct but end up with 0 for answer | Excel Discussion (Misc queries) | |||
date scale problem | Excel Discussion (Misc queries) | |||
Set Xvalues to an array of date, but the x-scale not correct | Excel Programming |