+ Reply to Thread
Results 1 to 14 of 14

Modify Formula that Calculates Time

  1. #1
    Registered User
    Join Date
    10-30-2012
    Location
    Chicago
    MS-Off Ver
    Excel 365
    Posts
    93

    Modify Formula that Calculates Time

    I have the following formula:
    =TEXT(D2-C2-TIME(,60,),"[h] \h\r\s: m \m\i\n\s")

    It's taking out 60 minutes for lunch. Now I want to use this to calculate straight time and not deduct any time. How can this be modified?

    Thank you!

  2. #2
    Forum Contributor
    Join Date
    11-13-2013
    Location
    United States
    MS-Off Ver
    2010
    Posts
    147

    Re: Modify Formula that Calculates Time

    Hi Karen615,

    Remove the

    Please Login or Register  to view this content.
    from the formula.
    ----
    Mark threads as Solved
    Star those that help

  3. #3
    Registered User
    Join Date
    10-30-2012
    Location
    Chicago
    MS-Off Ver
    Excel 365
    Posts
    93

    Re: Modify Formula that Calculates Time

    Excellent! Thank you!
    Have a great weekend!

  4. #4
    Registered User
    Join Date
    10-30-2012
    Location
    Chicago
    MS-Off Ver
    Excel 365
    Posts
    93

    Re: Modify Formula that Calculates Time

    Sorry, one last question...
    What formula do I use to sum all these times in the following format: (10 hrs: 45 mins) if the range is cell: E2:E25?
    Thank you for your help

  5. #5
    Forum Contributor
    Join Date
    11-13-2013
    Location
    United States
    MS-Off Ver
    2010
    Posts
    147

    Re: Modify Formula that Calculates Time

    Apologies for the delayed reply.

    Use this for the sum

    Please Login or Register  to view this content.
    Where I have the F7:F14, use your Column.

    Hope this helps.

    Steve

  6. #6
    Registered User
    Join Date
    10-30-2012
    Location
    Chicago
    MS-Off Ver
    Excel 365
    Posts
    93

    Re: Modify Formula that Calculates Time

    Thank you so much for your help Steve, but it's not calculating. It returns "0 hrs. 0 mins"
    Not sure what is wrong
    Karen

  7. #7
    Forum Contributor
    Join Date
    11-13-2013
    Location
    United States
    MS-Off Ver
    2010
    Posts
    147

    Re: Modify Formula that Calculates Time

    Hi Karen,

    Can you post a sample sheet so I can see how you are entering the data and the format for columns C and D?

    I can give you better direction then. It can contain dummy data.

    Thank you.

  8. #8
    Registered User
    Join Date
    10-30-2012
    Location
    Chicago
    MS-Off Ver
    Excel 365
    Posts
    93

    Re: Modify Formula that Calculates Time

    I hope I am able to attach the spreadsheet. Here goes!
    Thank you for your help!
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    11-13-2013
    Location
    United States
    MS-Off Ver
    2010
    Posts
    147

    Re: Modify Formula that Calculates Time

    Hi Karen,

    Downloaded the spreadsheet. Will post a reply soon.

  10. #10
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Modify Formula that Calculates Time

    Keep it simple..

    Just use plain old subtraction and sum for the values.
    And apply a format ([h] \h\r\s: m \m\i\n\s) to the cells with the formulas

    D2 and filled down : =C2-B2
    D21: =SUM(D2:D20)

    Then apply the format [h] \h\r\s: m \m\i\n\s to the whole range D2:D21

  11. #11
    Forum Contributor
    Join Date
    11-13-2013
    Location
    United States
    MS-Off Ver
    2010
    Posts
    147

    Re: Modify Formula that Calculates Time

    Hi Jonmo1,

    That is the same direction I was heading. Just downloaded her spreadsheet to show her the formatting.

    @Karen,

    I attached your sample spreadsheet with the changes. Column E is setup to do the math of out time minus the in time to get the total hours:minutes.

    Cell E21 is setup with a format of [h]:mm so it shows total hours and minutes and does not "roll over" once it hits 24 hours (basically that is a day).

    Selecting the Cells E2:E21, you can apply a Custom format of "[h] \h\r\s: m \m\i\n\s" (without the double quotes) and it will setup the format as you see on the attachment.

    Hope this Helps.

    Thanks for the input Jonmo1

    Steve


    Time Card - Test.xls

  12. #12
    Registered User
    Join Date
    10-30-2012
    Location
    Chicago
    MS-Off Ver
    Excel 365
    Posts
    93

    Re: Modify Formula that Calculates Time

    ImStevenB & Jonmo1,
    Thank you so much for all your help. It works great!
    Karen

  13. #13
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Modify Formula that Calculates Time

    You're welcome.

  14. #14
    Forum Contributor
    Join Date
    11-13-2013
    Location
    United States
    MS-Off Ver
    2010
    Posts
    147

    Re: Modify Formula that Calculates Time

    You're welcome Karen.

+ 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. Need Sheet that Calculates/Tracks Staff Time-Off & Paid Time Off Accrual
    By mikecann11 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 05-30-2017, 02:07 PM
  2. Need Help to get a formula that calculates my total shift time pls
    By becksmaster in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-04-2013, 12:20 AM
  3. Calculates date and time
    By stonefox in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-03-2011, 05:22 AM
  4. Time Tracker - I need a macro that calculates the time spent on an activity
    By amark in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-01-2011, 09:55 AM
  5. Need a function that calculates time between 2 dates
    By RawisTheGameHhH in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-30-2006, 08:54 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