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.
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.
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
or something like
(cut and paste from a project I'm working on)![]()
Please Login or Register to view this content.
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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks