+ Reply to Thread
Results 1 to 18 of 18

Start Date and End Date selection for chart.

  1. #1
    Registered User
    Join Date
    02-06-2015
    Location
    Gainesville, FL
    MS-Off Ver
    Office 2010
    Posts
    14

    Start Date and End Date selection for chart.

    EDIT: I am using Excel 2013

    I have one sheet that has my data and then another sheet that has my chart. I can't seem to grasp how to create a Start Date selection and an End Date selection so that my chart will represent the data it's given from ONLY between those dates. It's well over 4000 rows of data that is just a pain to copy and paste into another book just to figure out the frequency. DETAILS: Sheet 1: Has (Date/1/2/3/4/5/6) then numbers 1-6 represent a double digit number than can range from 1-100 for percentages. Sheet one has 4000+ rows of data to pool from. The chart on sheet 2 only needs to display numbers 1-100 and then how many times that number appears such as how many times did the output reach 50% or 76% etc.etc. I want the data displayed on the chart to be pooled only from a set of dates (Start and End) and that's why I would like to have a button for each (start date & end date) that maybe brings up a calendar or allows me to input the date or something like that. I am sure this is possible and I keep hearing about VB script. If anyone can point me in the right direction or even help me with the proper terminology for what I want to achieve then that would be good enough for a google search or even forum search.

    Mock Workbook Value Frequency Analysis.xlsx
    Last edited by DauntlessDS; 02-06-2015 at 02:40 PM. Reason: Sample Workbook Attached

  2. #2
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Start Date and End Date selection for chart.

    Could you upload a sample workbook? It makes giving help much easier.
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

  3. #3
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Start Date and End Date selection for chart.

    You don't need to venture into the world of VBA for this. You could create "dynamic named ranges" based on start and end dates in cells and have the chart automatically update from those.

    Perhaps if you post some sample data it will be easier to provide you with a working example.

    BSB

  4. #4
    Registered User
    Join Date
    02-06-2015
    Location
    Gainesville, FL
    MS-Off Ver
    Office 2010
    Posts
    14

    Re: Start Date and End Date selection for chart.

    Quote Originally Posted by BadlySpelledBuoy View Post
    You don't need to venture into the world of VBA for this. You could create "dynamic named ranges" based on start and end dates in cells and have the chart automatically update from those.

    Perhaps if you post some sample data it will be easier to provide you with a working example.

    BSB
    As requested previously I have made a mock workbook, it's attached to the previous post.

  5. #5
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Start Date and End Date selection for chart.

    Quote Originally Posted by DauntlessDS View Post
    The chart on sheet 2 only needs to display numbers 1-100 and then how many times that number appears such as how many times did the output reach 50% or 76% etc.
    Do you need the 1-6 split or just how many times each 'percentage' appears between two selected dates regardless of the 1-6 aspect?

  6. #6
    Registered User
    Join Date
    02-06-2015
    Location
    Gainesville, FL
    MS-Off Ver
    Office 2010
    Posts
    14

    Re: Start Date and End Date selection for chart.

    Quote Originally Posted by BadlySpelledBuoy View Post
    Do you need the 1-6 split or just how many times each 'percentage' appears between two selected dates regardless of the 1-6 aspect?
    The 1-6 is just number of values there are to collect for additional data each day. The chart only needs Horizontal Axis 1-100 and Vertical Axis Number of times the value appeared.

  7. #7
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Start Date and End Date selection for chart.

    OK, is this anywhere near what you're after?

    Select the start date in the green cell and the end date in the red cell. (Note, I've set them up so you cannot select an end date that's prior to the start date.)

    The number of times each occurrence appears between (and including) those dates will calculate in column J and the chart will populate from there.

    I've put the chart on the same sheet. This is for demonstration purposes only so you can easily see it changing when you change the dates. It's a simple enough task to have that show on a separate sheet.

    If this is what you need and you want to replicate it in your main workbook then press Ctrl+F3 to bring up the name manager to see how the named ranges work and replicate the formulas in column J. At the moment I have the formulas set to capture any data down to row 5000. You can obviously adjust this to suit your needs but be wary that this method uses SUMPRODUCT and if you reference entire columns with this formula things will become very sluggish very quickly!

    You could set the whole thing up to work with dynamic named ranges for the date and data columns too so the formulas would auto adjust to your data.

    BSB
    Attached Files Attached Files
    Last edited by BadlySpelledBuoy; 02-06-2015 at 03:29 PM.

  8. #8
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Start Date and End Date selection for chart.

    This may help with your dynamic y range http://www.andypope.info/charts/Scrolling.htm

  9. #9
    Registered User
    Join Date
    02-06-2015
    Location
    Gainesville, FL
    MS-Off Ver
    Office 2010
    Posts
    14

    Re: Start Date and End Date selection for chart.

    Quote Originally Posted by BadlySpelledBuoy View Post
    OK, is this anywhere near what you're after?

    Select the start date in the green cell and the end date in the red cell. (Note, I've set them up so you cannot select an end date that's prior to the start date.)

    The number of times each occurrence appears between (and including) those dates will calculate in column J and the chart will populate from there.

    I've put the chart on the same sheet. This is for demonstration purposes only so you can easily see it changing when you change the dates. It's a simple enough task to have that show on a separate sheet.

    If this is what you need and you want to replicate it in your main workbook then press Ctrl+F3 to bring up the name manager to see how the named ranges work and replicate the formulas in column J. At the moment I have the formulas set to capture any data down to row 5000. You can obviously adjust this to suit your needs but be wary that this method uses SUMPRODUCT and if you reference entire columns with this formula things will become very sluggish very quickly!

    You could set the whole thing up to work with dynamic named ranges for the date and data columns too so the formulas would auto adjust to your data.

    BSB
    That was absolutely perfect! I haven't broke it down yet to try and recreate it myself but it works exactly how I wanted it and I couldn't thank you more!

  10. #10
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Start Date and End Date selection for chart.

    No problem at all. Happy to help.

    I'll keep an eye on the thread in case there are follow up questions.

    BSB

  11. #11
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Start Date and End Date selection for chart.

    And here, just because I think it will be useful, is your example file with the dynamic ranges I mentioned earlier.
    This means the ranges will change size as more data is added (or removed) and you do not have to adjust the formulas.

    BSB
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    02-06-2015
    Location
    Gainesville, FL
    MS-Off Ver
    Office 2010
    Posts
    14

    Re: Start Date and End Date selection for chart.

    Quote Originally Posted by BadlySpelledBuoy View Post
    And here, just because I think it will be useful, is your example file with the dynamic ranges I mentioned earlier.
    This means the ranges will change size as more data is added (or removed) and you do not have to adjust the formulas.

    BSB
    It doesn't appear to be different?

  13. #13
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Start Date and End Date selection for chart.

    The differences are all behind the scenes.
    Press Ctrl+F3 again and you'll see more dynamic ranges. Then look at the formulas in column J compared to the earlier version.

    Try tagging new data on at the end of the list and you'll not need to make any changes to the formulas, even when you get past the 5000 rows that I set it to earlier.

    BSB

  14. #14
    Registered User
    Join Date
    02-06-2015
    Location
    Gainesville, FL
    MS-Off Ver
    Office 2010
    Posts
    14

    Re: Start Date and End Date selection for chart.

    Quote Originally Posted by BadlySpelledBuoy View Post
    The differences are all behind the scenes.
    Press Ctrl+F3 again and you'll see more dynamic ranges. Then look at the formulas in column J compared to the earlier version.

    Try tagging new data on at the end of the list and you'll not need to make any changes to the formulas, even when you get past the 5000 rows that I set it to earlier.

    BSB
    Ahhh I see, thank you. I am sorry for not looking at that before posting.

  15. #15
    Registered User
    Join Date
    02-06-2015
    Location
    Gainesville, FL
    MS-Off Ver
    Office 2010
    Posts
    14

    Re: Start Date and End Date selection for chart.

    Capture.PNG

    So I tried to adjust for letters as well as numbers to use for another workbook for cataloging information alphabetically. The above image shows that when I changed the chart data for the horizontal axis to be 1-26 instead of 1-100, it just mushed it together instead of spreading it across the chart size. What do I need to change for that to happen? I don't it's in the dynamic ranges so I am stumped otherwise.

  16. #16
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Start Date and End Date selection for chart.

    You need to change the range associated with the chart.
    In this workbook the dynamic named ranges are only dealing with the drop downs for start and end dates and the formulas in column J.
    There are no dynamic ranges tied to the chart in this case.

    So click on the chart until you see coloured outlines round the dates and data then resize them by dragging the bottom left corner of the coloured boxes up to the 26th row from the 100th row.

    Hopefully that makes sense.

    BSB

  17. #17
    Registered User
    Join Date
    02-06-2015
    Location
    Gainesville, FL
    MS-Off Ver
    Office 2010
    Posts
    14

    Re: Start Date and End Date selection for chart.

    Quote Originally Posted by BadlySpelledBuoy View Post
    You need to change the range associated with the chart.
    In this workbook the dynamic named ranges are only dealing with the drop downs for start and end dates and the formulas in column J.
    There are no dynamic ranges tied to the chart in this case.

    So click on the chart until you see coloured outlines round the dates and data then resize them by dragging the bottom left corner of the coloured boxes up to the 26th row from the 100th row.

    Hopefully that makes sense.

    BSB
    It does not as it is not in front of me right now. I will open it up when I get back and see what magic is.

  18. #18
    Registered User
    Join Date
    02-06-2015
    Location
    Gainesville, FL
    MS-Off Ver
    Office 2010
    Posts
    14

    Re: Start Date and End Date selection for chart.

    Quote Originally Posted by BadlySpelledBuoy View Post
    You need to change the range associated with the chart.
    In this workbook the dynamic named ranges are only dealing with the drop downs for start and end dates and the formulas in column J.
    There are no dynamic ranges tied to the chart in this case.

    So click on the chart until you see coloured outlines round the dates and data then resize them by dragging the bottom left corner of the coloured boxes up to the 26th row from the 100th row.

    Hopefully that makes sense.

    BSB
    Worked perfectly good sir but not in the way you described however it led me to what I needed to find. I selected the chart and clicked on the funnel then unchecked everything after 26. EZ-PZ. One last question IF anyone has the time to direct me to that tutorial or terminology as well. I want to enter the data from the top line as it will be arranged Newest to Oldest. Can I just insert new row above and go from there or will that mess up the formulas?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Counting if data falls on date between Start Date, End Date or Possible End Date
    By JessHasQuestions in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 07-26-2014, 08:01 AM
  2. Build chart displaying start date and end date
    By Cbowlin99 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-02-2013, 09:29 AM
  3. Replies: 1
    Last Post: 10-02-2012, 02:42 PM
  4. Replies: 0
    Last Post: 03-30-2012, 01:56 PM
  5. Chart with Editable Date Range (user specified start date)
    By fateshand in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 06-12-2009, 05:03 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1