+ Reply to Thread
Results 1 to 14 of 14

Calculate time same day and multiple days

  1. #1
    Registered User
    Join Date
    07-18-2015
    Location
    Earth, Upper Level
    MS-Off Ver
    Office Mac 2011
    Posts
    20

    Question Calculate time same day and multiple days

    i have a formula i have been using for awhile and i need to tweak it and cannot find a solution in other posts.

    Part 1
    A1 = Date Manually entered (Date formatted Monday, June 15, 2015)
    B1 = Start Date (References A1 Date Formatted 6/15/15)
    C1 = Start Time (Manually entered 8:00 AM)
    D1 = End Date (Manually entered Date Formatted 6/15/15)
    E1 = End Time (Manually entered 8:00 PM)
    F1 = Total Time =((D1+E1)-(B1+C1))


    this works when calculating within the same day, but sometime i need extend over multiple days and it become inaccurate.
    i have tried to add *24 at the end but it hasn't worked.
    how do i set this up for separate cell input of date and time for this calculation?



    Part 2 of this question would be to enter in cell G1 the total time off to put the final total hours worked into cell H1
    i am currently manually entering and figuring this out.


    Screen shot attached is a partial view


    Thanks in advance.
    Drew


    Screen Shot Excel Worksheet.png

  2. #2
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: Calculate time same day and multiple days

    Hello
    Try custom formatting F1 as so:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    DBY

  3. #3
    Registered User
    Join Date
    07-18-2015
    Location
    Earth, Upper Level
    MS-Off Ver
    Office Mac 2011
    Posts
    20

    Re: Calculate time same day and multiple days

    Winner! that worked!! i never thought about changing the format!
    Thanks DBY

  4. #4
    Registered User
    Join Date
    07-18-2015
    Location
    Earth, Upper Level
    MS-Off Ver
    Office Mac 2011
    Posts
    20

    Re: Calculate time same day and multiple days

    Now a question for bonus points

    i can't figure out how to take F4 (time format) and subtract G4 (number format) to get a solution into cell H4 (number format)

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Calculate time same day and multiple days

    Show us what's entered in F4 and G4 and tell us what result you expect?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Registered User
    Join Date
    07-18-2015
    Location
    Earth, Upper Level
    MS-Off Ver
    Office Mac 2011
    Posts
    20

    Re: Calculate time same day and multiple days

    using the above screen shot

    F4 calculated form cells to the left (time format) = 11.00
    G4 manually entered (number format) = 1.00
    H4 manually entered (number format) = 10.00

    trying to see the result in H4 and trying to automate the process!


    thanks,
    drew

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Calculate time same day and multiple days

    If G4 = 11:00 (time format) then:

    =(F4*24)-G4

    On a side note:

    using the above screen shot
    Many forum members, myself included, can't see PNG images. Here's what we see:
    Attached Images Attached Images

  8. #8
    Registered User
    Join Date
    07-18-2015
    Location
    Earth, Upper Level
    MS-Off Ver
    Office Mac 2011
    Posts
    20

    Re: Calculate time same day and multiple days

    And Thank You Tony!!

    if you or other members cannot see the screen shot posted, was it an issue of file format? .png? would a .pdf or .jpg been better?

  9. #9
    Registered User
    Join Date
    07-18-2015
    Location
    Earth, Upper Level
    MS-Off Ver
    Office Mac 2011
    Posts
    20

    Re: Calculate time same day and multiple days

    i have another question and will post it here as it continues on the above formulas...

    this is based on the solution value in the H4 column.
    i would like the ability to round up any value solved from the formula =(F4*24)-G4 that is above "0" but under "10" to round up to "10"
    so if the first solution value is 8 then it would round up to 10

    i have tried a few different variations and had no luck.



    Thanks

  10. #10
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Calculate time same day and multiple days

    Quote Originally Posted by effendrew View Post
    would a .pdf or .jpg been better?
    *.jpg would be better.

  11. #11
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Calculate time same day and multiple days

    Maybe this...

    =CEILING((F4*24)-G4,10)

  12. #12
    Registered User
    Join Date
    07-18-2015
    Location
    Earth, Upper Level
    MS-Off Ver
    Office Mac 2011
    Posts
    20

    Re: Calculate time same day and multiple days

    .jpg it will be. thanks for that info

  13. #13
    Registered User
    Join Date
    07-18-2015
    Location
    Earth, Upper Level
    MS-Off Ver
    Office Mac 2011
    Posts
    20

    Re: Calculate time same day and multiple days

    well that seems to round up all values within 10
    if the "F4" solution value is 13 or 19, it rounds up to 20

    i am trying to have only values above 0 and below 10 round up only those up to 10

  14. #14
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Calculate time same day and multiple days

    I'll get it eventually!

    Try this...

    =MAX(10,(F4*24)-G4)

+ 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: 1
    Last Post: 05-27-2015, 02:53 AM
  2. [SOLVED] Calculate number of days between two dates and time
    By Mys228 in forum Excel General
    Replies: 7
    Last Post: 08-25-2014, 08:44 AM
  3. [SOLVED] How to calculate cumulative time over different days in Excel
    By LWLS in forum Excel General
    Replies: 8
    Last Post: 08-03-2014, 09:19 PM
  4. [SOLVED] How to Calculate time outside core hours regardless of Days
    By mehulsagar in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-09-2012, 06:31 AM
  5. How to calculate days of the week in a given time frame
    By fsoares22 in forum Excel General
    Replies: 2
    Last Post: 03-17-2011, 12:09 PM
  6. How to calculate elapsed time between to days excluding weekends.
    By Mush001 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-23-2009, 04:19 PM
  7. Calculate Time Duration Spanning Different Days
    By mmjcarr in forum Excel General
    Replies: 1
    Last Post: 11-23-2009, 11:53 AM

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