+ Reply to Thread
Results 1 to 5 of 5

Re-basing lines on graph with 2-axis

  1. #1
    Registered User
    Join Date
    02-07-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re-basing lines on graph with 2-axis

    Hi there, I want to plot 2 lines against seperate y-axis on the same graph. I don't want to lose the quantitative value of the axis, but I want both lines to begin at exactly the same point on the graph. Can I effectively re-base one of the lines while keeping the quantitative values consistent with reality? I use Office 10 btw .... thanks a lot

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Re-basing lines on graph with 2-axis

    Hi

    To make this work you need both series’ starting points to be the same proportionate distance between their respective y axis minimums and maximums.

    (Series1 start value - Y1 minimum)/(Y1 maximum – Y1 minimum) = (Series2 start value - y2 minimum)/(Y2 maximum – Y2 minimum)

    This macro should do it automatically for you:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-07-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Re-basing lines on graph with 2-axis

    many thanks for that reply - my macro skills are nil but I will try to engage a colleague to help. Thanks again.

  4. #4
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Re-basing lines on graph with 2-axis

    You could do it using calculations if it's easier

    set minimum and maximum to autoscale for both axes
    for the Y2 axis, change the axis minimum from autoscale to fixed, setting it at whatever value the autoscale chose

    s1start = starting value of Series 1
    s1min - minimum value of axis Y1
    s1max = maximum value of axis Y1
    s2start = starting value of Series 2
    s2min - minimum value of axis Y2
    s2max = maximum value of axis Y2

    set the secondary Y maximum value to:
    = (s2start - s2min) / ((s1start - s1min) / (s1max - s1min))

    if that pushes your series off the scale, go through the same process but fix the Y1 minimum at whatever autoscale chooses and set the Y1 maximum to:

    = (s1start - s1min) / ((s2start - s2min) / (s2max - s2min))

  5. #5
    Registered User
    Join Date
    02-07-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Re-basing lines on graph with 2-axis

    Hi again, the macro didn't work, but I have to say you are a bona fide genius having just used to formula directly.

    Thanks a lot

+ 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