Graphs in Excel97

schurkenwoud

New Member
Joined
Apr 25, 2002
Messages
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
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
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
 
Upvote 0
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
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,397
Messages
6,119,271
Members
448,882
Latest member
Lorie1693

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top