+ Reply to Thread
Results 1 to 2 of 2

Secondary Axis Match Primary Axis Gridlines

  1. #1

    Secondary Axis Match Primary Axis Gridlines

    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


  2. #2
    Jon Peltier
    Guest

    Re: Secondary Axis Match Primary Axis Gridlines

    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/
    _______


    [email protected] wrote:

    > 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
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1