+ Reply to Thread
Results 1 to 7 of 7

How to double a y-axis range on charts?

  1. #1
    Forum Contributor
    Join Date
    02-14-2014
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2013
    Posts
    328

    How to double a y-axis range on charts?

    I have code (below) that charts two series, each has its own y axis (left/right side).
    The problem right now is that the chart shows the two series almost one on top
    of the other.

    I would like to expand the range of the right axis series, by doubling the values.
    For example instead of one graph's values going from 0-5,000 they would go
    from 0-10,000 etc.

    Each chart has their own ranges according to the data, but doubling the
    values for all the charts should separate the two series and make them easier
    to view.

    Any help in achieving this would be appreciated!


    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: How to double a y-axis range on charts?

    you can modify the min and maxscale of each axis with this
    Use our own values
    Please Login or Register  to view this content.
    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,438

    Re: How to double a y-axis range on charts?

    Why are you putting the 2 series in a single chart then?
    If the series appearing near to each other is not a benefit why do it.

    How about changing the chart type of 1 of the series?
    Or starting one scale above the other, to create a small panel chart
    Cheers
    Andy
    www.andypope.info

  4. #4
    Forum Contributor
    Join Date
    02-14-2014
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2013
    Posts
    328

    Re: How to double a y-axis range on charts?

    Quote Originally Posted by bsalv View Post
    you can modify the min and maxscale of each axis with this
    Use our own values
    Please Login or Register  to view this content.

    Thanks bsaly.
    The problem is that I have more than 100 charts and each one has different scales.
    I need a dynamic way (VBA) of making each chart, on the fly.

  5. #5
    Forum Contributor
    Join Date
    02-14-2014
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2013
    Posts
    328

    Re: How to double a y-axis range on charts?

    Quote Originally Posted by Andy Pope View Post
    Why are you putting the 2 series in a single chart then?
    If the series appearing near to each other is not a benefit why do it.

    How about changing the chart type of 1 of the series?
    Or starting one scale above the other, to create a small panel chart
    Thanks for helping out Andy.

    I do want the two series on one chart, because that way I can clearly compare
    one to the other time-wise.
    If I place the charts next to each other I lose the time comparison.

    As I mentioned above, because I have more than 100 charts, and they each have different
    scales, I need code to take the min/max of each series and chart them accordingly.

    Let me give you two examples.

    In each example I would like the Series2 (orange) to use the left side scale and be higher in the chart.
    And similarly I would like the Series1 (blue) to use the right side scale and be lower in the chart.

    Right now they are one on top of each other and it's difficult to see the Series2 values well.
    Attached Images Attached Images
    Last edited by ChrisXcel; 09-27-2021 at 04:42 PM. Reason: Cleaned up graph

  6. #6
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: How to double a y-axis range on charts?

    The problem is that I have more than 100 charts and each one has different scales.
    I need a dynamic way (VBA) of making each chart, on the fly.
    change .MaximumScale = 100 into .MaximumScale = MyMax and calculate that value 1 line earlier.
    I think you make it too difficult in your mind.

  7. #7
    Forum Contributor
    Join Date
    02-14-2014
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2013
    Posts
    328

    Re: How to double a y-axis range on charts?

    Quote Originally Posted by bsalv View Post
    change .MaximumScale = 100 into .MaximumScale = MyMax and calculate that value 1 line earlier.
    I think you make it too difficult in your mind.
    Thanks bsalv.
    I get the thrust of what you are suggesting, but I lack the programming skills to calculate the MyMax value.
    Most of the code that I use to create my charts was written by Rory here. Really brilliant stuff!

    Although I have written VBA stuff in Excel over the years, it was always been a painstaking effort
    if I had to do everything myself, as I never learned any programming. If something worked, I was thrilled!

    I don't know the declaring of variables (dim) etc. etc.
    I know you can create loops and should avoid the use 'Select' etc. etc.
    And I know what a Sub () is etc. etc.
    But I don't really have the skill set to create charts on my own.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Custom Y-axis scale/range for Column charts
    By WanArfan in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-02-2018, 12:34 AM
  2. Replies: 2
    Last Post: 01-22-2015, 03:51 PM
  3. Charts: Format Axis -> Axis Options -> Fixed minimum and maximum
    By johnmata in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-28-2013, 05:53 PM
  4. Replies: 3
    Last Post: 06-28-2013, 03:02 PM
  5. excell 2011 mac pivot tables and double axis charts
    By clks in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 10-09-2012, 03:39 AM
  6. Replies: 0
    Last Post: 12-08-2007, 06:14 PM
  7. [SOLVED] Hiding Values Below Z Axis Minimum Value on Axis Charts
    By TryingToExcel in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-18-2005, 11:06 AM

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