[Excel] - Chart with Variable X-Axis

Solved
Jodko -  
 Jodko -
Hello,

I am looking to create an Excel graph (values in relation to months) that would allow the user to choose the start and end dates by entering the start and end months themselves.

It is not, as I have often seen requested, to make the range of the x-axis expand as data appears, but rather to vary both the start month and the end month.

I already know that we can limit the data range by restricting the x-axis range:

If I set the y-axis range to the data from June 2011 to June 2015, and for the x-axis, I put June 2011 to May 2012, the graph will only display those values.

Now, I would like to be able to manipulate the x-axis range. By entering the first and last months in two cells, the user can generate a graph without having to go through the graph properties.

So we have a variable dimension x-axis range.

My problem is that I do not know what to put in the x-axis range definition so that it takes the limits defined by the user’s cells.

The goal is then to generate about fifty graphs automatically.

Thank you for your help!

Jodko.

Configuration: Windows XP / Safari 535.2

5 answers

Jodko
 
Hello and thanks to everyone.

Thanks to you, I've understood the concept of OFFSET! What a blast!

As for the 50 Graphs: 12 Lots, 11 Professions, over 6 rolling months and all the projects, that should be close to 50.

Thanks again.

Jodko.
2
ccm81 Posted messages 11033 Status Member 2 434
 
Hello

A proposal
https://www.cjoint.com/?0Ktq0PFj7FG

and greetings to tontong

RQ1. You can delete G2 and G1 which are not needed
RQ2. For the 50 graphics, I agree with tontong, and we should have a preview of your file (in Excel 2003 format)

best regards
0
ccm81 Posted messages 11033 Status Member 2 434
 
re

a mistake of .... discrepancy !!!

https://www.cjoint.com/?0Ktq6c63xtR

good continuation
0
ccm81 Posted messages 11033 Status Member 2 434
 
0
michel_m Posted messages 18903 Registration date   Status Contributor Last intervention   3 320
 
Good evening everyone

another method with other variable abscissa systems
see "zoom between 2 limits"
https://www.cjoint.com/?3KttgjcuA9K

--
Michel
0
tontong Posted messages 2575 Registration date   Status Member Last intervention   1 064
 
Hello,
The simplest method to vary the data ranges of a chart is to use an automatic filter or an advanced filter.
The method described for updating the data and obtaining a dynamic chart uses named references with the OFFSET function. The same method can be used to vary a start date and an end date; you just need to adjust the arguments of the OFFSET function.
To automatically generate 50 charts, using VBA (beyond my expertise) is necessary. Personal note: how can one make use of 50 charts?
If you choose one of the first two solutions, please specify your difficulties, the type of chart, and your version of Excel.
-1