+ Reply to Thread
Results 1 to 8 of 8

Why does it not add up properly?

  1. #1
    Registered User
    Join Date
    04-25-2008
    Location
    Essex, England
    MS-Off Ver
    Office 2010
    Posts
    52

    Why does it not add up properly?

    Hi Please see attached timesheet that I have adapted for use at work.

    My issue is that cell I8 should should show as 5.00 but shows as 5.60 and K8 should show as 9.00 but shows as 9.60. Weirdly only seems to be if I enter times as pm and on the half hour as can be seen from the other sample data I have put in.

    The sheet sorts itself out and does actually display the correct info at the end of it but this is really annoying me!


    Can anyone help?

    Cheers, Crackerdaq
    Attached Files Attached Files

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Why does it not add up properly?

    Why should it be 5.00?

    (INT(I38/60))+(MOD(I38,60))/100 evaluates to 5.6 (well actually 5.59999999).

    What is it supposed to be calculating?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    04-25-2008
    Location
    Essex, England
    MS-Off Ver
    Office 2010
    Posts
    52

    Re: Why does it not add up properly?

    It is supposed to return the hours worked in G and H for I8 and the daily total in K8. It does this in row 7 and 9 successfully .

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Why does it not add up properly?

    Why don't you enter real time values?
    Cheers
    Andy
    www.andypope.info

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Why does it not add up properly?

    Can't you just subtract G from H?

  6. #6
    Registered User
    Join Date
    04-25-2008
    Location
    Essex, England
    MS-Off Ver
    Office 2010
    Posts
    52

    Re: Why does it not add up properly?

    If I just subtract, then it wont take into account any of the drop down reasons in Column O. Also gives me issues with positive/negative numbers.

    I realise that the way it has been set up may not be the simplest way of doing it but aside from the error above - it does work so was hoping to tweak that as opposed to re-do the whole thing.

    Thanks

  7. #7
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Why does it not add up properly?

    Quote Originally Posted by Crackerdaq View Post
    ... it does work so was hoping to tweak that as opposed to re-do the whole thing
    Thanks
    Old saying "You can't flog a dead horse", except perhaps to "Findus"

  8. #8
    Valued Forum Contributor Harribone's Avatar
    Join Date
    02-24-2013
    Location
    Midlands, UK
    MS-Off Ver
    Excel 2019/365
    Posts
    570

    Re: Why does it not add up properly?

    Becuase you are using decimal numbers instead of times you will need to enter the below in I6:

    Please Login or Register  to view this content.
    Then drag down.

    In F6:

    Please Login or Register  to view this content.
    And again drag down. This will account for any half hour times enter in the morning.


    It would be easier to just set the cell to a time and subtract one from the other though.
    Say thanks, click *

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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