+ Reply to Thread
Results 1 to 9 of 9

X-Y axis scale auto-update

  1. #1
    Registered User
    Join Date
    04-10-2010
    Location
    Abu Dhabi, UAE
    MS-Off Ver
    Excel 2003, 2007 and 2010
    Posts
    148

    X-Y axis scale auto-update

    Hi,

    I have the folowing in my spreadsheet:
    in K5: =min(B5:B100)-50
    in L5: =max(B5:B100)+50
    in M5: =min(C5:C100)-50
    in N5: =max(C5:C100)+50

    I have a sepparate chart sheet (scattered) where I need a code to auto-update X and Y axis scale when new input data in the worksheet is copied and to take min and max from the above cells (B5:B100 is Y axis, C5:C100 is X), I've tried arround some codes but no success yet...
    Appreciate your help (please mention where to copy the code: under modules, chart or the worksheet?)
    Last edited by Ralem; 12-19-2010 at 06:39 PM.
    Cheers
    Ralem

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: X-Y axis scale auto-update

    Hi Ralem
    have a look at teylyns example quadrant data
    You will need find the Absolute maximum and minimum values then
    plot them as both - and + values
    http://spreadsheet-toolbox.com/libra...ith-quadrants/
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Registered User
    Join Date
    04-10-2010
    Location
    Abu Dhabi, UAE
    MS-Off Ver
    Excel 2003, 2007 and 2010
    Posts
    148

    Re: X-Y axis scale auto-update

    Thanks for the reply but didn't help in my case, I've been trying the below code but couldn't make it work; please check:

    Please Login or Register  to view this content.
    Last edited by Ralem; 12-20-2010 at 05:42 AM.

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: X-Y axis scale auto-update

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

  5. #5
    Registered User
    Join Date
    04-10-2010
    Location
    Abu Dhabi, UAE
    MS-Off Ver
    Excel 2003, 2007 and 2010
    Posts
    148

    Re: X-Y axis scale auto-update

    Sorry, please check it now

  6. #6
    Registered User
    Join Date
    04-10-2010
    Location
    Abu Dhabi, UAE
    MS-Off Ver
    Excel 2003, 2007 and 2010
    Posts
    148

    Re: X-Y axis scale auto-update

    Hi, I got the folowing code to work:

    Please Login or Register  to view this content.
    I assigned it to a button, how can I run it automatically when data is updated without using a macro button.
    Appreciate help

  7. #7
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: X-Y axis scale auto-update

    Hi Ralem
    what triggers the data to update?

  8. #8
    Registered User
    Join Date
    04-10-2010
    Location
    Abu Dhabi, UAE
    MS-Off Ver
    Excel 2003, 2007 and 2010
    Posts
    148

    Re: X-Y axis scale auto-update

    Hi Pike,
    The data range is balnk, and as the user copy and paste new data I want the macro to run.

  9. #9
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: X-Y axis scale auto-update

    Hi Ralem,
    You culd use the worksheet events
    Please Login or Register  to view this content.

+ 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