Charts | Same primary and secondary axis automatically

hvieira

New Member
Joined
Nov 25, 2013
Messages
6
Hi,

Is it possible to set the same scale (e.g. min, max) on both the primary and secondary axis of a chart?

If so, does it have to be via a macro?

I know it is possible to do it manually, however when we have dynamic data this is an issue...

Thank you!

Henrique Vieira


P.S.: I'm currently using Excel 2007.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
This may not work exactly as you want, but it's worth a trial.

If you delete the secondary axis, the series plotted on that secondary axis uses the same range as the primary axis. The series still remains on the secondary axis, just the scale should change.
 
Upvote 0
thisoldman,

Your suggestion works just fine! :)

I guess most times we simply miss the obvious answers!

Thank you for you reply and help!
 
Upvote 0
I've been struggling with this as well. I have a very dynamic graph. Not only am I using dynamic values, but depending on the type of data that the user wants to view, the graph type would also change.
I ended up using VBA, and pointing to a cell that calculates for any situation (line or stacked etc.) the max value

Code:
Dim lngMaxScale As Long
    lngMaxScale = Sheet22.Range("C93").Value

    ActiveChart.Axes(xlValue, xlPrimary).MinimumScale = 0
    ActiveChart.Axes(xlValue, xlPrimary).MaximumScale = lngMaxScale
    ActiveChart.Axes(xlValue, xlSecondary).MinimumScale = 0
    ActiveChart.Axes(xlValue, xlSecondary).MaximumScale = lngMaxScale
 
Upvote 0

Forum statistics

Threads
1,215,459
Messages
6,124,947
Members
449,198
Latest member
MhammadishaqKhan

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