+ Reply to Thread
Results 1 to 4 of 4

Scaling Axis Difficulty

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

    Scaling Axis Difficulty

    I'm trying to work an auto scaling feature into a Macro. Whenever the number of rows increase I would like the corresponding graphs X-axis to increase so it always remains within range. How could this be done? Thanks in advance.

  2. #2
    Valued Forum Contributor mohd9876's Avatar
    Join Date
    05-04-2011
    Location
    Amman, Jordan
    MS-Off Ver
    Excel 2010
    Posts
    426

    Re: Scaling Axis Difficulty

    You don't need a Macro to do so, it could be easily implemented by formatting your data as a table (excel 2010 only)
    any graph or formula will be updated automatically as soon as you add new rows
    just select any point in the range of data then go to insert>table

  3. #3
    Forum Contributor
    Join Date
    06-16-2011
    Location
    London
    MS-Off Ver
    Excel XP
    Posts
    276

    Re: Scaling Axis Difficulty

    or something like

    Please Login or Register  to view this content.
    (cut and paste from a project I'm working on)

  4. #4
    Registered User
    Join Date
    02-16-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Scaling Axis Difficulty

    This is what I have so far but I still cannot get it to work.... Thanks in advance

    For n = 3 To 12
    Set Ws = ThisWorkbook.Worksheets(n)
    LastRow = Ws.Range("D25000").End(xlUp).Row
    For p = 1 To 3
    Workbooks("workbookname_main").Sheets(n).ChartObjects("Chart " & p).Chart.SetSourceData Source:=Sheets(n).Range(Cells(10, 6 + p), Cells(LastRow, 6 + p))
    Next
    Next

+ 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