![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 3
|
Hi,
I want a graph to size its minimum axes automaticly but not to start at zero, as is the standard functionality of Excel97. Can you help me? Kind regards, Erik Schakenbos |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Ontario
Posts: 52
|
can't think of how to do it automatically (ie without human intervention)but if you want to know how to format axis to something other than zero, when chart is made,
-right click on one of gridlines -click on format gridlines -click on 'scale' -change Minimum from zero to whatever value you want(the check mark next to 'automatic' will disappear) -click 'ok' hth |
|
|
|
|
|
#3 |
|
New Member
Join Date: Apr 2002
Posts: 3
|
In msaccess it is possible to do this automaticly, using the following code:
Private Sub Rapportvoettekst_Format(Cancel As Integer, FormatCount As Integer) Dim MINPROD As Double Dim MINZIEKTE As Double MINPROD = Int((0.95 * Me!MINPROD) / 100) * 100 Me!Grafiek204.Object.Application.Chart.Axes(2).MinimumScale = MINPROD MINZIEKTE = Int((Me!MINZIEKTE) * 100) / 100 Me!Grafiek205.Object.Application.Chart.Axes(2).MinimumScale = MINZIEKTE End Sub So this must be possible in Excel also. Can anybody help? [ This Message was edited by: schurkenwoud on 2002-04-26 07:02 ] |
|
|
|
|
|
#4 |
|
New Member
Join Date: Apr 2002
Posts: 8
|
Once you've made the axis scale adjustments mentioned above, you can add it as a user-defined custom chart type (Chart menu, Chart Type dialog box, Custom Types tab) and set it as your default chart if you like.
|
|
|
|
|
|
#5 |
|
New Member
Join Date: Apr 2002
Posts: 3
|
But the essence of the question is that i want excel to determine the most correct minimum value. Because the content of the graph changes all the time because it is based on a pivot table. So everytime the graph is openend it should determine the most correct minimum value automaticly
Hope anyone can help. |
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Feb 2002
Location: Guderup, Denmark
Posts: 287
|
Hi
I don't kknow if your graph has it's own sheet or is an object in another sheet so i cannot be more exact than this. You can put this into a Sheets_activate og Charts_Activate event. Sub Makro2() ActiveSheet.ChartObjects(1).Activate With ActiveChart.Axes(xlValue) MINPROD = Application.WorksheetFunction.Min(ActiveChart.SeriesCollection(1).Values) .MinimumScale = MINPROD End With End Sub regards Tommy |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|