+ Reply to Thread
Results 1 to 4 of 4

Total If between two times

  1. #1
    Registered User
    Join Date
    12-29-2014
    Location
    UK
    MS-Off Ver
    365
    Posts
    2

    Total If between two times

    Hi,

    I hope someone can help. I'm trying to figure out the formula to allow a total time to show based on the total hours/minutes between two other times.

    For example...

    A1 - 08:00 (time 1)
    B1 - 17:30 (time 2)

    C1 - 09:30 (time elapsed B1-A1)

    D1 - I want the formula in this cell to show a time in hours/minutes based on the time in C1. So if the time elapsed is equal to or less than 05:00 then D1 will show 00:05 (5 minutes), if it is between 05:01 and 06:00 then D1 will show 00:10 (10 minutes), if it is between 06:01 and 07:00 then D1 will show 00:15 and so on.

    Thank you

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Total If between two times

    Try
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,202

    Re: Total If between two times

    Try

    =IF(C1<=5/24,5/1440,((HOUR(C1)-HOUR(5/24)+2)*5)/1440)

    format as time (HH:MM)
    Last edited by JohnTopley; 06-15-2021 at 03:51 PM.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Total If between two times

    ...and another


    =(MAX(0,A2-A1-5/24)*24*5+5)/1440
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

+ 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. How to count the total visit times?
    By tangwt in forum Office 365
    Replies: 7
    Last Post: 03-07-2021, 06:49 AM
  2. Calculating the total between two times that go over midnight
    By groovybluedog in forum Excel General
    Replies: 11
    Last Post: 07-14-2016, 04:43 PM
  3. Total Times for amount of work someone did.
    By caddy400ex in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-16-2016, 05:59 PM
  4. 1 item = total times used
    By mrjackt in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-17-2014, 02:35 PM
  5. Total times each word appears
    By JPKenny in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-08-2010, 08:15 PM
  6. trying to total times
    By Speedbird1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-23-2008, 01:15 PM
  7. How do you total times on a timesheet
    By M_Siikarla in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-23-2005, 01:46 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