LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6,582
Default Variable time scaling for different views in a graph

You can also do this without VBA using dynamic ranges:

http://pubs.logicalexpressions.com/P...cle.asp?ID=246

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
http://PeltierTech.com
_______


"SIR Knight" wrote in message
ps.com...

Matz,

You can do this using VBA as follows

If you enter your start date in Cell A1, and End Date in A2

you can then use a macro to use these values in the scale:

'set start and end dates
uvStart = Format(Range("A1").Value, "##")
uvEnd = Format(Range("A2").Value, "##")

'set Axes values to styart and end dates
ActiveSheet.ChartObjects("Chart 1").Activate
ActiveChart.Axes(xlValue).Select
With ActiveChart.Axes(xlValue)
.MinimumScale = uvStart
.MaximumScale = uvEnd
End With

I have assumed that your chart is called "Chart 1". You can change the
code as required for chart name or location of you dates

I hope this helps

Steve



 
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 time calculation Issam LAdki New Users to Excel 6 April 7th 05 04:05 PM
unmet challenge boris Excel Worksheet Functions 2 March 16th 05 02:13 PM
Excel sheet for workout jogging time and graph Trevor New Users to Excel 1 March 7th 05 03:54 PM
Time axis column and scatter/line graph kraymond Charts and Charting in Excel 5 February 8th 05 11:34 PM
xy scatter graph with a scrolling time element Brad Charts and Charting in Excel 2 January 7th 05 01:53 PM


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