I need to be able to automatically change the X-axis range for several Excel charts. I typically plot time (in month intervals) on the X-axis and I need the charts to cover the last 24 months. I am currently using the scatter plot format. I would like to use the NOW() function to generate the current date in one of the spreadsheet cells and back calculate the starting date of the required 24 month period.
So my question is... How can I automatically change the minimum and maximum scaling factors to be set to these values? I would perferred a simple Excel macro since I am not very famaliar with VB. Also, the sample code (macro or VB) would be greatly appreciated.