+ Reply to Thread
Results 1 to 11 of 11

Take two hours from 00:00 and show 10:00 not ######

  1. #1
    Registered User
    Join Date
    10-27-2010
    Location
    Swansea, Wales
    MS-Off Ver
    Excel 2007
    Posts
    47

    Take two hours from 00:00 and show 10:00 not ######

    Hi all,

    I have a formula that takes a variety of production times for our manufacturing business (i.e. 06:00 equals 6 hours production time) and subtracts them from a finish time to derive start time.

    For example, if finish time is 02:00 and production time is 06:00 then finish time less production time should equal 20:00.

    However when I attempt this formula I get a ##### answer. Any way around this?

    Thanks.
    Last edited by swanseaexcel; 01-18-2011 at 12:18 PM.

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Take two hours from 00:00 and show 10:00 not ######

    Suppose finish time in A1 and prod time in A2, in another cell enter
    Please Login or Register  to view this content.
    and format as needed

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Take two hours from 00:00 and show 10:00 not ######

    http://support.microsoft.com/kb/182247 ?
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Take two hours from 00:00 and show 10:00 not ######

    Quote Originally Posted by MarvinP View Post
    Perfect MS answer ! Why make things easy when you can do them the hard way

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Take two hours from 00:00 and show 10:00 not ######

    Alternative to the addition of 1 would be to use MOD:

    Please Login or Register  to view this content.
    @Arthurbr - agreed - switching to 1904 Date System is not really ideal, nor is storing a Number as Text.

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Take two hours from 00:00 and show 10:00 not ######

    =IF(A1>A2, A2+1-A1, A2-A1)
    Although MOD(A1-A2,1) is definitely cooler.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  7. #7
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Take two hours from 00:00 and show 10:00 not ######

    Chemist ,

    I think my solution is the same as yours but a little shorter

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Take two hours from 00:00 and show 10:00 not ######

    Yes it is, pardon these tired eyes. Yours is also cooler.

  9. #9
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Take two hours from 00:00 and show 10:00 not ######

    Quote Originally Posted by ChemistB View Post
    Yes it is, pardon these tired eyes. Yours is also cooler.
    Is it that early where you are?

  10. #10
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Take two hours from 00:00 and show 10:00 not ######

    It's 10:40 AM. I'd prefer to blame tired eyes than old eyes.

  11. #11
    Registered User
    Join Date
    10-27-2010
    Location
    Swansea, Wales
    MS-Off Ver
    Excel 2007
    Posts
    47

    Re: Take two hours from 00:00 and show 10:00 not ######

    DonkeyOte my saviour yet again!

    Thank you all for the replies, I used the MOD option as everyone said that was coolest!

+ 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