Secondary Axis Match Primary Axis Gridlines

B

blimbert

I routinely make graphs for many different product lines, and am
constantly altering the secondary axis min/max/ or scale so the graph
doesn't look odd. Is there a way to automatically have the secondary
axis min/max/ or scale values change so that the secondary axis major
tick marks will line up with those of the primary axis?

For example, in the following data series, automatically makes the
primary axis range from 0 to 14000, with a 2000 unit increment. On the
secondary axis, excel sets it to 0 to 250 with a 50 point increment.
How do I trick excel into make the secondary axis have 7 increments
(14000 / 2000) so that the major tick marks / gridlines match one
another? (eg 7 * 50 = a 350 secondary axis max value, which makes the
gridlines work).

Point Primary Secondary
1 1000 10
2 2000 20
3 3000 30
4 4000 100
5 5000 50
6 6000 60
7 7000 70
8 8000 200
9 12000 200
10 8000 200

Thoughts?
Brian
 
J

Jon Peltier

Brian -

You need to either adjust the secondary scale manually, or write a VBA
procedure to adjust it whenever the data changes or you press a button.

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top