ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   How do I automate the minimum and maximum x scale? (https://www.excelbanter.com/charts-charting-excel/156319-how-do-i-automate-minimum-maximum-x-scale.html)

jgraves

How do I automate the minimum and maximum x scale?
 
I have an xy scatter plot with a date/time on the x axis (range). The date
in the range updates to the current day. I have the x minimum and maximum
values in my graph set to span an exact 24 hour periord.

When I use the "Auto" feature, it puts a large gap on either side of the
selected data. I am trying to get rid of these gaps by manually setting the
min/max on the x axis scale to the exact 24 hour period I am graphing.

When the date rolls to the next day, the min/max values that I set manually
do not change and remain set for the previous day. Is there any way to have
the min/max values automatically adjust to the current day, or to look at the
date in my data array?

Jon Peltier

How do I automate the minimum and maximum x scale?
 
You could write formulas to determine useful axis limits, then use VBA to
apply them:

http://peltiertech.com/Excel/Charts/...nkToSheet.html

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


"Jgraves" wrote in message
...
I have an xy scatter plot with a date/time on the x axis (range). The date
in the range updates to the current day. I have the x minimum and maximum
values in my graph set to span an exact 24 hour periord.

When I use the "Auto" feature, it puts a large gap on either side of the
selected data. I am trying to get rid of these gaps by manually setting
the
min/max on the x axis scale to the exact 24 hour period I am graphing.

When the date rolls to the next day, the min/max values that I set
manually
do not change and remain set for the previous day. Is there any way to
have
the min/max values automatically adjust to the current day, or to look at
the
date in my data array?





All times are GMT +1. The time now is 01:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com