Solved

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

Posted on 2011-02-16
9
181 Views
Last Modified: 2012-05-11
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

Open in new window

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.

Thanks for your help,

John Fistere
0
Comment
Question by:John Fistere
  • 5
  • 3
9 Comments
 
LVL 6

Expert Comment

by:nsonbaty
ID: 34913837
you can fix the Y axis as you fix the X axis
0
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 500 total points
ID: 34914580
=ADDRESS(6,1,,,"sheet1")&":"&ADDRESS(9,1)
0
 
LVL 2

Author Comment

by:John Fistere
ID: 34917186
Thanks for your comments.

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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 43

Assisted Solution

by:Saqib Husain, Syed
Saqib Husain, Syed earned 500 total points
ID: 34973247
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
 
LVL 2

Author Comment

by:John Fistere
ID: 35004552
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
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 35004856
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
 
LVL 2

Author Comment

by:John Fistere
ID: 35024470
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.

Thanks for your help.

John
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 35024567
John, Your question asks

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

Your question also asks

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
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 35056815
Thanks for the points...and the grade...and the special attention.

Saqib
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question