+ Reply to Thread
Results 1 to 6 of 6

Formula calculating differently after the number 4...

  1. #1
    Registered User
    Join Date
    10-18-2011
    Location
    Cardiff, Wales
    MS-Off Ver
    Excel 2003
    Posts
    4

    Smile Formula calculating differently after the number 4...

    Hi, my maiden post on the board! Although I imagine I'll be here quite a lot from now on!

    I'm trying to set up a time sheet that will calculate the remaining time by summing two collums and subtracting them from each other. The formula I'm using looks like this:

    Please Login or Register  to view this content.
    I know it's a long formula, but it's imperative that the whole calculation is done in one cell! This formula uses the cell above to create a running total down in one column including new numbers from the columns to the left.

    The formula works well...until it reaches the number four, at which point instead of adding the hour onto the total and resetting the decimal to 0, it keeps the decimal as 60 and doesn't add it on as it was for 3 and below. As far as I can see the formula is exactly the same in each cell and I've got absolutely no idea how it's happening.

    Has anyone encountered this before, or does anybody know of a fix? The only workaround I can think of is an IF that checks for the 0.6 and converts it to a 1, but I think I'll run out of characters trying that!

    Thanks in advance for any help

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Formula calculating differently after the number 4...

    Hi Slodey. Click GO ADVANCED and use the paperclip icon to post up a copy of your workbook so we can SEE your formula failing. Point out the cell if it's not evident, show us in another column what the results "should be" based on your goals.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    10-18-2011
    Location
    Cardiff, Wales
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Formula calculating differently after the number 4...

    Hi, thanks for replying!

    I've attached a copy of my sheet. It's column H that the problem is occuring in, I've marked the occurences in red. Column I is the same formula without the *0.6 that I've used to get the minute reading. Column J is what the result should be.

    Thanks for any help you can give!
    Attached Files Attached Files

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Formula calculating differently after the number 4...

    I would recommend that you consider using real time values rather than splitting into minutes and hours, that makes all your calculations more convoluted, as you've discovered.

    Having said that....this formula in H8 copied down should work without the problems you are seeing

    =IF(COUNT(D7:G7)=0,"",SUM(D$7:D7)-SUM(F$7:F7)+INT((SUM(E$7:E7)-SUM(G$7:G7))/60)+MOD((SUM(E$7:E7)-SUM(G$7:G7)),60)/100)
    Audere est facere

  5. #5
    Registered User
    Join Date
    10-18-2011
    Location
    Cardiff, Wales
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Formula calculating differently after the number 4...

    Thanks for replying. That formula has solved my problem! In future I'll look into using more efficient/less clunky formulas.

    Thanks again! I'll probably be back soon with other issues! Haha

  6. #6
    Registered User
    Join Date
    10-18-2011
    Location
    Cardiff, Wales
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Formula calculating differently after the number 4...

    Hi again,

    In the formula I was originally using, when minus numbers were displayed I added a few lines to keep them displaying as a time value (ie: -0.15 instead of -0.85, -0.30 instead of -0.70). Is there any way that I could apply this to the new formula?

    Thanks again for all your help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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