ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Update Charts X-axis (https://www.excelbanter.com/excel-discussion-misc-queries/50968-update-charts-x-axis.html)

dbaggett

Update Charts X-axis
 
I have a program with 76 charts. They all use the same range to get their
x-axis (dates). At the first of every month, I change the dates to show the
upcoming month. The table shows the entire year, but we just view it one
month (fiscal) at a time. The series is by rows, but could be changed to
columns if necessary. I inherited this program.

Currently I have to update each one of them manually (click on each and
change their XValues). Is there a way I can update all of them at one time?
Could vba be used to select and update each chart with me just selecting the
range? I am no stranger to vba, but have done very little when it comes to
charts.

Any help would be greatly appreciated.

Andy Pope

Update Charts X-axis
 
Hi,

You can use a dynamic range to provide the xaxis label reference.
http://peltiertech.com/Excel/Charts/DynamicLast12.html

You might want to use VBA to apply the named range rather that do it 76
times. But once done updating should be automatic.

Cheers
Andy

dbaggett wrote:
I have a program with 76 charts. They all use the same range to get their
x-axis (dates). At the first of every month, I change the dates to show the
upcoming month. The table shows the entire year, but we just view it one
month (fiscal) at a time. The series is by rows, but could be changed to
columns if necessary. I inherited this program.

Currently I have to update each one of them manually (click on each and
change their XValues). Is there a way I can update all of them at one time?
Could vba be used to select and update each chart with me just selecting the
range? I am no stranger to vba, but have done very little when it comes to
charts.

Any help would be greatly appreciated.


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info


All times are GMT +1. The time now is 01:00 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com