+ Reply to Thread
Results 1 to 3 of 3

Asking for help to set up a time sheet using If(OR and MOD

  1. #1
    Registered User
    Join Date
    01-26-2017
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    2

    Asking for help to set up a time sheet using If(OR and MOD

    I could use some help please.

    I am setting up a time sheet with four possible hour entries:
    Start/Lunch Out/Lunch In/Stop And daily totals
    I want to Total the daily hours using Clock values (60 minutes) – not using results in Base 100 (i.e. I want results to be 15 and 30 – NOT 25 and 50).

    We all know that Excel makes this difficult by having the TIME formats include the Date - so that 8:00(AM) becomes 1/8/1900 12:00:00AM u0on entry into a Time formatted cell.

    So I did a work around – and I need some help “tweeking” it. Please.

    For this request here are some sample data:
    Column C D E F G H
    Row 9 8:00 12:00 12:30 16:30 TOT-in Base 100 =INT(G9)

    Row 27 8:00 12:20 12:50 17:00 TOT-in Base 100 =INT(G27)

    I
    Row 9 =MROUND(MOD(G9,1)*60,15)/100

    Row 27 =MROUND(MOD(G27,1)*60,15)/100

    I am using an IF(OR formula to test the data in the cell containing the results of the MOD formula (I).

    An abbreviated copy (Non-Nested) of my Nested IF(OR formula is in column L. ( i.e.):
    L
    Row 9 =IF(OR(I9=0.00,I9=0.60),0.00,"error")
    Row 27 =(IF(OR(I27=0.70,I27=0.30),0.30,”error”)


    What I am encountering is this:
    1) Excel keeps changing the decimals within my formula – i.e. 0.00
    becomes 0 and 0.30 become 0.3. And I wonder if this might be
    preventing my getting good results – because -
    2) All but the first test IF(I9=0) [I]- after Excel changes the decimal - in
    my nested IF(OR formula, returns FALSE – (and so “error”). And all
    nested If(ORs are coded identically and the formatting of the cells to
    be tested is also identical.

    My questions:
    1) Does Excel permit the testing of the results of one formula (MOD) by
    another formula (IF(OR)?
    2) How do I get Excel to stop changing my test data within the formula
    (or does it matter)?
    3) Is there a special way to format the cells (both the Data cells and the
    Formula cells) so that the IF(OR formula can “see” it for testing
    purposes?
    I’ve tried several of the formats so far - with no affect.

    Any help would be greatly appreciated.

    Frustrated.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,023

    Re: Asking for help to set up a time sheet using If(OR and MOD

    This might be easier if we had a worksheet to play with.

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential information is removed first!!

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,023

    Re: Asking for help to set up a time sheet using If(OR and MOD

    On re-reading this, I'm maybe a bit clearer. If you enter 08:30 as EXACTLY that 0 8 : 3 0, Excel will automatically format that as TIME. So, a simple subtravction is all you need.

    =(D9-C9)+(F9-E9)
    Attached Files Attached Files

+ 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. [SOLVED] time sheet help, format TIME and formula based on the actual time entered.
    By bh mng in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-06-2016, 01:10 PM
  3. Time sheet that splits normal time and a half and double time
    By leewat in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-09-2016, 07:52 PM
  4. [SOLVED] Creating a Time elapsed Spread Sheet that records and posts time...
    By swade730 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-24-2013, 07:11 PM
  5. Replies: 5
    Last Post: 04-18-2013, 11:31 AM
  6. Replies: 2
    Last Post: 03-15-2013, 08:50 PM
  7. Detailed Time Sheet (overtime, comp time, vacation used)
    By Robert D. Sandersfeld in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 05-22-2006, 05:25 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