Article ID: 141363 - View products that this article applies to.
This article was previously published under Q141363
In Microsoft Excel, you can set the Minimum and Maximum properties of the y-axis scale to any value. The example in this article shows the steps necessary to create a Microsoft Visual Basic for Applications procedure that determines the minimum and maximum values contained in your data and sets the scale based on these values.
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. The following Visual Basic macro sets the minimum and maximum values for the y-axis scale in a chart to the maximum and minimum values of the data used to create the chart.
Type the following in a Visual Basic module sheet:
Using the Macro
Article ID: 141363 - Last Review: October 11, 2006 - Revision: 2.3
Retired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
Contact us for more help