ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   Changing a chart scale using a formula/macro (https://www.excelbanter.com/charts-charting-excel/39667-changing-chart-scale-using-formula-macro.html)

Doug

Changing a chart scale using a formula/macro
 
Is it possible to change the scale (min & max of the Y axis) of a chart
using a formula or macro. I need to be able to apply this to about 20
different sets of min & max numbers on the same chart.

Thanks,
Doug

Jon Peltier

Doug -

The code is like this:

With ActiveChart.Axes(2,1)
.MinimumScale = <new minimum
.MaximumScale = <new maximum
End With

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


Doug wrote:

Is it possible to change the scale (min & max of the Y axis) of a chart
using a formula or macro. I need to be able to apply this to about 20
different sets of min & max numbers on the same chart.

Thanks,
Doug


Doug

Thanks,
Doug

"Jon Peltier" wrote:

Doug -

The code is like this:

With ActiveChart.Axes(2,1)
.MinimumScale = <new minimum
.MaximumScale = <new maximum
End With

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


Doug wrote:

Is it possible to change the scale (min & max of the Y axis) of a chart
using a formula or macro. I need to be able to apply this to about 20
different sets of min & max numbers on the same chart.

Thanks,
Doug




All times are GMT +1. The time now is 07:10 PM.

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