x
• Status: Solved
• Priority: Medium
• Security: Public
• Views: 190

Excel 2007 - I would like to create a list based on selected dates

I have data to be plotted that looks like this, but for the whole year:
``````1-Jan	40
8-Jan	41.42117588
15-Jan	42.89284528
22-Jan	44.4168022
29-Jan	45.9949044
5-Feb	47.62907561
12-Feb	49.32130795
19-Feb	51.07366428
26-Feb	52.88828077
5-Mar	54.76736949
12-Mar	56.7132211
19-Mar	58.72820764
26-Mar	60.81478544
2-Apr	62.9754981
``````
I calculate the dates such as 1-Feb-11 and 28-Feb-11 and I would like to plot the four points within that date range.

Using the MATCH function I can calculate 6 and 9 as the row numbers, and then with the ADDRESS function I can calculate \$B\$6 and \$B\$9 as the endpoints of the data.

How can I specify Sheet1!\$B\$6:\$B\$9 as the range of Y-value data to plot?  I can do it manually with Select Data, but I need to do it dynamically, I suppose using VBA.  Of course I would use Sheet!\$A\$6:\$A\$9 for the X-values.

John Fistere
0
John Fistere
• 5
• 3
2 Solutions

Commented:
you can fix the Y axis as you fix the X axis
0

EngineerCommented:
0

Engineer, retiredAuthor Commented:

nsonbaty,
It is not the axes I am asking about.  It is the selection of X and Y data points.

ssagibh,
That's a good way to specify the date and data ranges.  How do I use them? Simply setting the date range and data range to those cells in the Select Data dialog does not work.  Do I need a VBA expression?

John
0

EngineerCommented:
Sorry John, I missed your response.

You can make use of dynamic ranges to specify the x- and y- ranges as demonstrated in the attached file. the values 6 and 9 in cells F1 and F2 are used to define the named ranges.

Saqib
Dynamic-Graph.xlsx
0

Engineer, retiredAuthor Commented:
I have realized that because the Excel graph will plot only the points within the date range of the graph, I don't need to select the points to be plotted.  I can call out the entire data set.

I have no idea how to close out this particular question.  I sort of figured out I didn't need to do what I was asking advice to do.  Should I just abandon the question?

John
0

EngineerCommented:
Even if you realise that you do not need help on this issue any more, if any of the responses addresses your question appropriately you can accept it and it will become part of EE's knowledge base.

If the response does not address your question correctly you can give feedback appropriately to get an appropriate response.

If you find a solution to the asked question yourself before anyone else does then you can post it here and accept your own response.

If no solution is provided within a reasonable timeframe then you can delete the question.

Saqib
0

Engineer, retiredAuthor Commented:
Thank you, Saqib.

I can't identify any response that I would consider to be the answer to my badly formed question, so I will delete the question.

John
0

EngineerCommented:

How to plot points within a given date range. My second response does just that.

How to specify Sheet1!\$B\$6:\$B\$9 as the range of Y-value data to plot? My first response does that.

So you should either tell us what is not right with the responses or accept one or both as an answer to the asked question (even if is badly formed).

Saqib
0

EngineerCommented:
Thanks for the points...and the grade...and the special attention.

Saqib
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.