+ Reply to Thread
Results 1 to 10 of 10

Trying to Sum Case Duration Minutes by Hour

Hybrid View

  1. #1
    Registered User
    Join Date
    11-29-2022
    Location
    Portland
    MS-Off Ver
    2019
    Posts
    15

    Trying to Sum Case Duration Minutes by Hour

    Hi All,

    I'm looking to find the best excel function to get the number of minutes I have for each case by hour (would also need to account for midnight rule). Please see attached workbook example with yellow highlighted cells being the expected output. Also - for the second example you can see that the case began right before midnight and ended at 1a. So minutes are also counted in column Y (23:00)
    Case Minutes.xlsx
    Really hitting a roadblock with this - any help would be appreciated!!
    Last edited by excelhelp99; 07-13-2023 at 06:35 PM.

  2. #2
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    3,216

    Re: Trying to Sum Case Duration Minutes by Hour

    Please read the yellow banner at the top of page and attach a good sample workbook - please remember to enter EXPECTED results

  3. #3
    Registered User
    Join Date
    11-29-2022
    Location
    Portland
    MS-Off Ver
    2019
    Posts
    15

    Re: Trying to Sum Case Duration Minutes by Hour

    Hi Gregb11 - please see attachedCase Minutes.xlsx

  4. #4
    Forum Contributor
    Join Date
    10-22-2022
    Location
    Santa Cruz, Bolivia
    MS-Off Ver
    MSO 365
    Posts
    157

    Re: Trying to Sum Case Duration Minutes by Hour

    hi there, try this formula to copy and drag from C3:

    =IF(C$2<$B3, 1440*MIN(MAX(, C$2+1/24-$A3+($A3>$B3)), MAX(, MOD($B3-C$2, 1)), 1/24), "")
    I hope it result useful.

  5. #5
    Registered User
    Join Date
    11-29-2022
    Location
    Portland
    MS-Off Ver
    2019
    Posts
    15

    Re: Trying to Sum Case Duration Minutes by Hour

    Hi ExceLogan - thank you! It looks like the formula generally works but doesn't work for cases that began the day before...i.e. not counting minutes for the day before at all. Is there any fix for that?

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

    Re: Trying to Sum Case Duration Minutes by Hour

    Try the following modification to ExceLogan's formula:
    Formula: copy to clipboard
    =IF(C$2<$B3, 1440*MIN(MAX(, C$2+1/24-$A3+($A3>$B3)), MAX(, MOD($B3-C$2, 1)), 1/24), IF(AND($A3>$B3,SUM(C$2,1/24)>$A3),1440*MIN(1/24,SUM(C$2,1/24)-$A3),""))

    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  7. #7
    Registered User
    Join Date
    11-29-2022
    Location
    Portland
    MS-Off Ver
    2019
    Posts
    15

    Re: Trying to Sum Case Duration Minutes by Hour

    This worked! Thank you! One more question - this formula does not account for cases beginning and ending in the same hour, is there a way to add that to the formula? As an example, I can have a case begin at 12:06 and end at 12:25, but it will say the total duration during 12:00 is 25 minutes not 19.

    Really appreciate all your help!

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

    Re: Trying to Sum Case Duration Minutes by Hour

    This seems to work:
    Formula: copy to clipboard
    =IF(C$2<$B3, 1440*MIN(MAX(, C$2+1/24-$A3+($A3>$B3)), MAX(, MOD($B3-C$2, 1)),  MAX(, MOD($B3-$A3, 1)), 1/24), IF(AND($A3>$B3,SUM(C$2,1/24)>$A3),1440*MIN(1/24,SUM(C$2,1/24)-$A3),""))

    Let us know if you have any questions.

  9. #9
    Registered User
    Join Date
    11-29-2022
    Location
    Portland
    MS-Off Ver
    2019
    Posts
    15

    Re: Trying to Sum Case Duration Minutes by Hour

    This worked!!! Thank you!!

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

    Re: Trying to Sum Case Duration Minutes by Hour

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools menu above your first post. 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. Calculating Years, Months, Days, Hours, Minutes for Work Days/Hour from Minutes
    By shadow2351jl in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 01-14-2022, 06:48 AM
  2. Finding duration working hour
    By azbi in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 11-28-2019, 02:08 AM
  3. Removing lunch hour from Log Sheet. (Removing Specific Hour duration)
    By SirTypos in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-31-2018, 11:01 PM
  4. [SOLVED] Converting total minutes into hour and minutes in a single corresponding cell
    By paradise2sr in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-16-2017, 02:44 AM
  5. Convert duration to minutes
    By tapsmiled in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 06-29-2015, 11:08 AM
  6. Bar Stock Graph 24 Hour Duration
    By thermometer in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 10-18-2014, 08:39 PM
  7. duration calculator (in minutes)
    By opg in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-26-2008, 01:39 PM

Tags for this Thread

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