How to change the range of a chart in Excel using VBA?
        Posted  
        
            by Pieter
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Pieter
        
        
        
        Published on 2010-03-19T05:00:04Z
        Indexed on 
            2010/03/19
            5:01 UTC
        
        
        Read the original article
        Hit count: 258
        
Hi guys,
I'm using an Excel sheet to keep track of a particular time series (my daily weight, if you must know). I created a macro that inserts a row, automatically adds today's date and calculates a moving average based on my input.
There is also a chart to visualize my progress. I have tried recording a macro that updates the time series in the graph, but to no success.
How can I create a macro or VBA script that, when executed, updates the range of the graph from A(x):Cy to A(x-1):Cy to include today's measurement?
Thanks!
© Stack Overflow or respective owner