+ Reply to Thread
Results 1 to 6 of 6

Use Dropdown to Select Display Date Range

  1. #1
    Registered User
    Join Date
    12-04-2020
    Location
    California, USA
    MS-Off Ver
    Office 365
    Posts
    22

    Use Dropdown to Select Display Date Range

    I'll have two columns, first column with a date (12/01/2020)
    Second column with hours with a value 0-12
    Every day I'll input the current date and a value for today's hours.

    I would like to have a drop-down to select how to display the date list:
    Daily Shows the hours in column to right
    Weekly Shows the weekly total in column to right
    Monthly Shows the monthly total in the column to right
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,737

    Re: Use Dropdown to Select Display Date Range

    In G7 you can use this formula:

    =SUMIFS(D:D,C:C,">="&F7,C:C,"<="&F7+6)

    then copy down as required. You can use this formula in J7 to get the monthly totals:

    =SUMIFS(D:D,C:C,">="&I7,C:C,"<="&EOMONTH(I7,0))

    Again, copy down as required.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    12-04-2020
    Location
    California, USA
    MS-Off Ver
    Office 365
    Posts
    22

    Re: Use Dropdown to Select Display Date Range

    No, that wasn't quite what I was looking for. Probably my fault for not explaining it well enough.

    I've attached another spreadsheet that may explain it a little better.

    When I select a display option from the drop-down (Daily, Weekly, Monthly), the output will be one of the three examples I've put below
    The selection from the drop-down will select the type of display output.

    Daily shows the hours
    Weekly shows the weekly sum of hours
    Monthly shows the monthly sum of hours

    Remember: Everyday I'll be adding to the list. I'm assuming this will be a table.
    Attached Files Attached Files
    Last edited by OldSwimmer1650; 12-24-2020 at 02:29 PM. Reason: Missing information

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,737

    Re: Use Dropdown to Select Display Date Range

    Check out this file, then. I've copied your daily data to a sheet called Raw_data, and you should put any new data into this sheet as it occurs.

    I've set up a data-validation drop-down in cell C2 with your three choices, but I've also given you the facility to specify a start date and an end date in cells D2 and E2 (which you could leave blank if you wish to). I figured that if you had a year's worth of data then you may not want to see all of it when selecting Daily.

    The display adjusts accordingly.

    Hope this helps.

    Pete

    P.S. I've only copied the formulae in columns C and D down to row 103 - copy them down further from that row if you need to (only really applicable if you want to see more daily data).
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-04-2020
    Location
    California, USA
    MS-Off Ver
    Office 365
    Posts
    22

    Re: Use Dropdown to Select Display Date Range

    PERFECT! TY TY TY!

    That's exactly what I was trying to do.
    Now the only problem is I don't know where/how to look to see what you did.

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,737

    Re: Use Dropdown to Select Display Date Range

    You're welcome, and thanks for the rep.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    If you need any explanation for any of the formulae then feel free to post back, though I might not check the forum for a few days.

    Merry Christmas.

    Pete

+ 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. Dropdown to select table then rows display infor from selected
    By Hooty in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-15-2018, 02:37 PM
  2. Replies: 1
    Last Post: 01-17-2018, 01:26 PM
  3. [SOLVED] Select & Display editable table via dropdown box
    By -AJ- in forum Excel General
    Replies: 2
    Last Post: 06-16-2013, 02:30 PM
  4. Replies: 3
    Last Post: 01-11-2012, 11:58 AM
  5. Select Empty Cell Within a DropDown List Box's Range
    By bdb1974 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2010, 06:58 PM
  6. How to select a value in a range using a dropdown.
    By Cortlyn in forum Excel General
    Replies: 2
    Last Post: 07-03-2009, 07:58 AM
  7. Select and Display latest date items only
    By HMIExcel08 in forum Excel General
    Replies: 4
    Last Post: 12-02-2008, 03:20 PM

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