+ Reply to Thread
Results 1 to 10 of 10

Monthly Totals with multiple date ranges

  1. #1
    Forum Contributor
    Join Date
    05-27-2012
    Location
    New Brunswick, Canada
    MS-Off Ver
    Excel 2016
    Posts
    349

    Monthly Totals with multiple date ranges

    I am trying to make a table of all vacations by month. Cells F21:F35 have the total days per request and I'd like to keep the total by month in Column B. I'd also like to only total them if Column G says Approved. I stopped in Feb 2024 but as more come in in future months, Columns A & B will get bigger.

    I manually entered the totals in F2:F17 while I was trying various formulas but none seemed to give me the right answers.
    I also highlighted one particular request in Row 34. There will be some requests that start in one month and end in another.
    Attached Files Attached Files
    Last edited by Wheelie686; 01-18-2024 at 12:51 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    10-17-2007
    Location
    Tasmania, Australia
    MS-Off Ver
    2019, 365(v2403)
    Posts
    370

    Re: Monthly Totals with multiple ranges

    Hi Wheelie686,

    So just looking the the Requests table, if you pop the following in Cell F19 and copy down
    Please Login or Register  to view this content.
    Unsure what the highlighted range in F2:F15 is for
    Last edited by russkris; 01-17-2024 at 10:36 PM. Reason: Added CODE wrap

  3. #3
    Forum Contributor
    Join Date
    05-27-2012
    Location
    New Brunswick, Canada
    MS-Off Ver
    Excel 2016
    Posts
    349

    Re: Monthly Totals with multiple ranges

    Hi russkris,
    F2:F15 are the results I'm looking for. For instance
    Jan 2023 has a total of 11 days (3 requests) when you look at the duration of all the Approved dates in the bottom table
    Feb-Apr have none
    May 2023 has 3
    June has 2
    And so on and so forth

    So what I'm looking for is a formula for B2-B15
    Last edited by Wheelie686; 01-18-2024 at 12:36 AM.

  4. #4
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Monthly Totals with multiple date ranges

    Please try in B2 and copy down:
    Please Login or Register  to view this content.
    This is an array formule, please confirm the formula with Ctrl+Shift+Enter
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    05-27-2012
    Location
    New Brunswick, Canada
    MS-Off Ver
    Excel 2016
    Posts
    349

    Re: Monthly Totals with multiple date ranges

    So something I found a little odd - it worked exactly as you planned in your document (which I changed to your name when I uploaded) but the exact same formula in mine does not... I can use your copy, which works, I just find it odd that it doesn't work in mine.

    On a side note, would there be a way to update the formula to account for expansion beyond Row 19-33? As more months go by, Columns A&B will get longer, therefore pushing Row 19 down to 20 and beyond. Also as new requests come in, it will go beyond Row 33.
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,990

    Re: Monthly Totals with multiple date ranges

    It would be better to put the requests data somewhere else so that it does not have to be moved each time that a new month is added in columns A:B.
    That said one way to do what you want would be to convert the input range under the heading Requests into an Excel table.
    Note that after the conversion I inserted some rows which moved tbl_Request down to row 21.
    I also added a row at the bottom of the table and the formula automatically adjusted to both changes.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  7. #7
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Monthly Totals with multiple date ranges

    In your book2 are the dates in column A of the wrong year (23 January 2024, 23 February 2024 and so on.
    You need there dates in 2023 and not in 2024.

    I've changed the dates in your book2 and the formula works perfect.
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    05-27-2012
    Location
    New Brunswick, Canada
    MS-Off Ver
    Excel 2016
    Posts
    349

    Re: Monthly Totals with multiple date ranges

    Thank you JeteMc and HansDouwe!

  9. #9
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: Monthly Totals with multiple date ranges

    You are Welcome!

    Thanks for the feedback and rep .

    Glad to have helped.

  10. #10
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,990

    Re: Monthly Totals with multiple date ranges

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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. Replies: 5
    Last Post: 04-14-2017, 01:45 PM
  2. Combining multiple COUNTIFS for monthly totals
    By Dave2468 in forum Excel General
    Replies: 2
    Last Post: 09-28-2016, 01:46 PM
  3. [SOLVED] How do I group daily totals into weekly/monthly/quarterly totals
    By situationroom in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-28-2013, 09:58 AM
  4. Replies: 3
    Last Post: 02-12-2011, 12:10 PM
  5. Running Monthly Totals on Multiple Sheets
    By Dragunov in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-29-2007, 12:57 AM
  6. [SOLVED] Summing Weekly Totals into Monthly Totals
    By steph44haf in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-05-2006, 11:55 AM
  7. How do I sum YTD totals based on monthly totals
    By Bsgrad02 in forum Excel General
    Replies: 3
    Last Post: 07-12-2005, 12:05 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