+ Reply to Thread
Results 1 to 3 of 3

Calculating Time Differences and Allocating Hours

  1. #1
    Registered User
    Join Date
    08-28-2014
    Location
    Melbourne
    MS-Off Ver
    2011
    Posts
    8

    Calculating Time Differences and Allocating Hours

    Hello!
    Never mind, solved it! :D
    Last edited by blaze182; 08-28-2014 at 07:41 AM.

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,062

    Re: Calculating Time Differences and Allocating Hours

    1) SUM(8-A6), SUM is not required. This should simply be 8-A6.

    2) AND(B6>18, SUM(24-B6))

    is a LOGICAL test. It will produce TRUE or FALSE (1 or 0).

    So whatever the first part of the formula works out to be you'll just be adding 1 or 0 to the result. I;m sure that's not what you want.

    3) Assuming A6 is the number of hours (0-23) try

    =IF(A6<8,8-A6,0)+IF(B6>18,B6-18,0)
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Registered User
    Join Date
    08-28-2014
    Location
    Melbourne
    MS-Off Ver
    2011
    Posts
    8

    Re: Calculating Time Differences and Allocating Hours

    Thank-you Special-K!

    This was what I ended up with in the end:
    =IF(A5<8, SUM(8-A5))+IF(B5>18, SUM((B5-24)+6))

    I realised I had another error which is why I had to swap the second part around but it works now.

    When should SUM be used opposed to a raw calculation?

+ 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] Calculating Time differences
    By LGT06 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-01-2013, 06:56 AM
  2. Calculating time differences over different dates
    By AndyE in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-04-2010, 01:26 PM
  3. Calculating time differences
    By cjccpa in forum Excel General
    Replies: 5
    Last Post: 04-01-2008, 09:02 AM
  4. Calculating time differences
    By WaySlowWhitey in forum Excel General
    Replies: 3
    Last Post: 10-22-2007, 10:26 AM
  5. Replies: 1
    Last Post: 05-11-2006, 05:22 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