+ Reply to Thread
Results 1 to 14 of 14

MROUND formula for a Timesheet with break

  1. #1
    Registered User
    Join Date
    08-19-2010
    Location
    Arizona, USA
    MS-Off Ver
    Excel Mac 2011
    Posts
    59

    MROUND formula for a Timesheet with break

    Hello Experts!

    I have a timesheet that is organized as follows:

    Col B = Time In
    Col C = Time Out
    Col E = Time In
    Col F = Time Out
    Col G = Total Hrs

    I would like Col G to round the Total (Worked) Hrs Up or Down in 15 minute increments (EX: 9:15, 9:30, etc.)
    The current formula in Col G is: =ROUND(IF((OR(B13="",C13="")),0,IF((C13<B13),((C13-B13)*24)+24,(C13-B13)*24))+IF((OR(E13="",F13="")),0,IF((F13<E13),((F13-E13)*24)+24,(F13-E13)*24)),2)

    Can someone much smarter than me modify this formula to do this?

    Thanks in advance!

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: MROUND formula for a Timesheet with break

    Perhaps this?
    =MROUND(M2,15/60/24)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    08-19-2010
    Location
    Arizona, USA
    MS-Off Ver
    Excel Mac 2011
    Posts
    59

    Re: MROUND formula for a Timesheet with break

    Thanks Ford. That helps but what I think I need is to combine these two formulas into one and replace it with the formula in Col G:

    =MROUND(IF((OR(B13="",C13="")),0,IF((C13<B13),((C13-B13)*24)+24,(C13-B13)*24)-C13/60),15/60)

    =MROUND(IF((OR(E13="",C13="")),0,IF((F13<E13),((F13-E13)*24)+24,(F13-E13)*24)-F13/60),15/60)

  4. #4
    Registered User
    Join Date
    08-19-2010
    Location
    Arizona, USA
    MS-Off Ver
    Excel Mac 2011
    Posts
    59

    Re: MROUND formula for a Timesheet with break

    Sorry, there was an error in the 2nd formula. I need to combine THESE TWO formulas into ONE:

    =MROUND(IF((OR(B13="",C13="")),0,IF((C13<B13),((C13-B13)*24)+24,(C13-B13)*24)-C13/60),15/60)

    =MROUND(IF((OR(E13="",F13="")),0,IF((F13<E13),((F13-E13)*24)+24,(F13-E13)*24)-F13/60),15/60)

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: MROUND formula for a Timesheet with break

    Perhaps post a small sample sheet. (see yellow banner)

  6. #6
    Registered User
    Join Date
    08-19-2010
    Location
    Arizona, USA
    MS-Off Ver
    Excel Mac 2011
    Posts
    59

    Re: MROUND formula for a Timesheet with break

    File uploaded. Thx!

  7. #7
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: MROUND formula for a Timesheet with break

    It seems the upload didn't work. Did you follow the recommendation of the banner ( don't forget to click the " Upload" button in the wizard, it's not very clear)

  8. #8
    Registered User
    Join Date
    08-19-2010
    Location
    Arizona, USA
    MS-Off Ver
    Excel Mac 2011
    Posts
    59

    Re: MROUND formula for a Timesheet with break

    Strange, when I go into manage attachments it shows up with an option to 'remove'.

  9. #9
    Registered User
    Join Date
    08-19-2010
    Location
    Arizona, USA
    MS-Off Ver
    Excel Mac 2011
    Posts
    59

    Re: MROUND formula for a Timesheet with break

    I tried uploading the file again, not sure if it was successful.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    08-19-2010
    Location
    Arizona, USA
    MS-Off Ver
    Excel Mac 2011
    Posts
    59

    Re: MROUND formula for a Timesheet with break

    Looks like it was!

  11. #11
    Registered User
    Join Date
    08-19-2010
    Location
    Arizona, USA
    MS-Off Ver
    Excel Mac 2011
    Posts
    59

    Re: MROUND formula for a Timesheet with break

    So, using the attached sample file what I need is for to round Col G ("Total Hours") up or down to the nearest quarter hour (00, 15, 30, 45). Thx!

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: MROUND formula for a Timesheet with break

    My suggestion is not working for you because col G does not contain time, it contains regular values. If you dont convert the answers (*24), it should work for you

  13. #13
    Registered User
    Join Date
    08-19-2010
    Location
    Arizona, USA
    MS-Off Ver
    Excel Mac 2011
    Posts
    59

    Re: MROUND formula for a Timesheet with break

    FDibbins - Thank you so much for your suggestion! I ended up modifying the existing formula as follows, which seems to be working: =MROUND(IF((OR(B13="",C13="")),0,IF((C13<B13),((C13-B13)*24)+24,(C13-B13)*24))+IF((OR(E13="",F13="")),0,IF((F13<E13),((F13-E13)*24)+24,(F13-E13)*24)),0."25")

  14. #14
    Registered User
    Join Date
    08-19-2010
    Location
    Arizona, USA
    MS-Off Ver
    Excel Mac 2011
    Posts
    59

    Re: MROUND formula for a Timesheet with break

    ... that last bolded section s/b "0.25"

+ 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. [SOLVED] MROUND() function in formula
    By mikehk in forum Excel General
    Replies: 5
    Last Post: 01-10-2019, 10:12 AM
  2. [SOLVED] Calculate Break deduction for timesheet summary
    By majorqt75 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-16-2017, 12:20 PM
  3. [SOLVED] Help Using MROUND in A Formula
    By gaspower in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-06-2015, 08:28 PM
  4. [SOLVED] MROUND & IF Formula Challenges
    By vheb in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-13-2014, 09:10 AM
  5. Replies: 2
    Last Post: 02-20-2014, 06:20 AM
  6. MROUND formula
    By SaschaB in forum Excel General
    Replies: 2
    Last Post: 10-20-2011, 10:43 AM
  7. Timesheet without break times
    By village_idiot in forum Excel General
    Replies: 5
    Last Post: 05-03-2007, 11:01 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