+ Reply to Thread
Results 1 to 12 of 12
  1. #1
    Registered User
    Join Date
    05-09-2009
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    38

    Scale Value displaying in the x Axis with Min=Max

    Hi Experts,

    i build a graphik and the value are always changing.
    How can i dynamically displaying the scale value so that it always showing depending on the table the maximun value in the scale equal the min value.

    Thank you for your input.

    Cheers

  2. #2
    Forum Moderator pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2010
    Posts
    5,141

    Re: Scale Value displaying in the x Axis with Min=Max

    dreams

    some thing like
    Code:
    Test = Range("F2").Value
        With ActiveChart.Axes(xlValue)
            .MinorUnit = Test
     End With
    hope it helps
    regards pike

    If the solution helped please donate
    here to the RSPCA

    Sites worth visiting;

    J&R Solutions - royUK

    AJP Excel Information - Andy Pope

    Spreadsheet Toolbox

    JBeaucaires Excel Files

    VBA for smarties - snb

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    10,944

    Re: Scale Value displaying in the x Axis with Min=Max

    Not sure I understand your question. The Min can not be equal to the Max on the scale.

    Perhaps an example workbook would better illustrate you problem
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    05-09-2009
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    38

    Re: Scale Value displaying in the x Axis with Min=Max

    Quote Originally Posted by pike View Post
    dreams

    some thing like
    Code:
    Test = Range("F2").Value
        With ActiveChart.Axes(xlValue)
            .MinorUnit = Test
     End With
    hope it helps
    Hi,
    Thank you for replying.
    Do you have an example for my clarifcation?

    Cheers

  5. #5
    Registered User
    Join Date
    05-09-2009
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    38

    Re: Scale Value displaying in the x Axis with Min=Max

    Quote Originally Posted by Andy Pope View Post
    Not sure I understand your question. The Min can not be equal to the Max on the scale.

    Perhaps an example workbook would better illustrate you problem
    Hi Andy,

    thank for your response.
    Please find my example in the attached Work.
    I would like to have the axis in the middle fixed.
    So that when i do a selection the axis remained fixed.
    I would also like to have the the negative value in red.
    Thank you for your Input.

    Cheers
    Attached Files Attached Files

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    10,944

    Re: Scale Value displaying in the x Axis with Min=Max

    I see you have a tornado chart and you want the negative min value to match the positive max value.

    You can do this by using a dummy series, plotted as bar on the secondary axis.
    You will need to use formula to determine the Min and Max values for each category. You then take the largest absolute value as one data value and the inverse as the other.

    In order to have the negative values of the axis in red use this custom number format

    0;[red]0
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  7. #7
    Registered User
    Join Date
    05-09-2009
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    38

    Re: Scale Value displaying in the x Axis with Min=Max

    Hi Andy,

    thank you for assisting me. it solves my problem.
    I have 3 questions:

    1. how can i display the negative values in a table as red? I would like o formula which is checking the table and highligh as red those cells which ar negativ.

    2. How can i display on a chart as red those values which are negativ?

    3. How can i by creating a chart manage so that all charts have the same size?

    4. How can i fixe a sheet so that there is not a possibility to extend the sheet.
    For e.g in the attached file i would like to have A1 till Z83 fixed so that i can only see what is in that area.

    Thank you once again for your great help.

    Cheers

    Dreams
    Attached Files Attached Files
    Last edited by shg; 06-03-2009 at 09:35 PM. Reason: deleted spurious quote

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    10,944

    Re: Scale Value displaying in the x Axis with Min=Max

    I gave you the Number format to make the negative values Red.
    0;[red]0

    For the bars to be red when negative you can use Invert Negative.
    http://www.andypope.info/charts/Invertneg.htm

    To scale the charts to all use the same x axis range do the Min/Max formula on all the original data rather than the formula altered chart data.

    See this thread for ways of restricting scroll area
    http://www.excelforum.com/excel-gene...ge-scroll.html
    Cheers
    Andy
    www.andypope.info

  9. #9
    Registered User
    Join Date
    05-09-2009
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    38

    Re: Scale Value displaying in the x Axis with Min=Max

    Hi Andy,

    i have a question regarding the formula you use.
    {=MAX(IF(ISNA(D27:G27);0;D27:G27))}
    How did you enter the highlighted bracket?
    When i clicked on the formula in the sheet you sent me the bracket dissapears. When i enter it with my through my keyboard it is not any more showing the result.
    How can i solve it?

    Cheers


    Pat
    Last edited by shg; 06-03-2009 at 09:35 PM. Reason: deleted spurious quote

  10. #10
    Forum Moderator shg's Avatar
    Join Date
    06-21-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2007
    Posts
    25,137

    Re: Scale Value displaying in the x Axis with Min=Max

    Dreams,

    Please don't quote whole posts. It just clutters the forum.
    Microsoft MVP - Excel
    Entia non sunt multiplicanda sine necessitate

  11. #11
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    10,944

    Re: Scale Value displaying in the x Axis with Min=Max

    The curly brackets denote the forumla is an array formula.
    You need to commit the formula using CTRL+SHIFT+ENTER rather than just ENTER. The brackets will automatically be added.
    Cheers
    Andy
    www.andypope.info

  12. #12
    Registered User
    Join Date
    05-09-2009
    Location
    Berlin
    MS-Off Ver
    Excel 2003
    Posts
    38

    Re: Scale Value displaying in the x Axis with Min=Max

    Thank you very much.

    Cheers

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