+ Reply to Thread
Results 1 to 3 of 3

Same scale for primary and secondary axis

  1. #1
    Registered User
    Join Date
    06-23-2010
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    5

    Same scale for primary and secondary axis

    Hi!
    I am using primary and secondary axis for creating overlapping bars using VBA. The problem is that there should be same scale for both axis, which changes (every time I run the code, there can be different Max value). I was thinking - is it possible:

    1) to find max value in column E and assign this value to variable "variable_containing_max_value";
    2) Put this variable as maximum scale something like this:


    Please Login or Register  to view this content.
    3) The same for secondary axis.

    Thank you very much!

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Same scale for primary and secondary axis

    Hello alias,

    welcome to the forum.

    The code below uses defined range names to set the min, max and units of the primary and secondary axes. You can exchange the references to the ranges with calculations of your own, if you want, using Application.WorksheetFunction.Max for example.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-23-2010
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Same scale for primary and secondary axis

    Thank you very much!
    I appreciate your efforts!

+ 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