+ Reply to Thread
Results 1 to 3 of 3

Calculate time difference

  1. #1
    Mats-Lennart Hansson
    Guest

    Calculate time difference

    Hi,
    I'm new to excel so I hope that you can help me. I want to make an excel
    file that calculates my working hours. If I for example writes 08:00 in one
    cell and 17:00 in another cell I want the result to be 00:00 (since my
    working day is 1 hour and I have 1 hour lunch -> 17:00-08:00-08:00-01:00 =
    00:00). This means that if I work from 08:00 to 16:00 the result should
    be -01:00 and if I work from 08:00 to 18:00 the result should be 00:00.

    I've tried to do the following:

    A1: 08:00 ' Start time
    A2: 17:00 ' End time

    C1: 01:00 ' Normal lunch time
    C2: 08:00 ' Normal working day

    =A2-A1-C1-C2 (Cell format set to time)

    This works when I work at least 8 hours a day but not if I work less than 8
    hours a day, then I get ###### in my cell.

    Can anyone help me with his? It should be simple, but I just can't get it to
    work...

    Thanks,

    Mats-Lennart



  2. #2
    Chip Pearson
    Guest

    Re: Calculate time difference

    See www.cpearson.com/excel/overtime.htm for example timesheet
    formulas.


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com


    "Mats-Lennart Hansson" <[email protected]> wrote in message
    news:ep8T%23Q%[email protected]...
    > Hi,
    > I'm new to excel so I hope that you can help me. I want to make
    > an excel
    > file that calculates my working hours. If I for example writes
    > 08:00 in one
    > cell and 17:00 in another cell I want the result to be 00:00
    > (since my
    > working day is 1 hour and I have 1 hour lunch ->
    > 17:00-08:00-08:00-01:00 =
    > 00:00). This means that if I work from 08:00 to 16:00 the
    > result should
    > be -01:00 and if I work from 08:00 to 18:00 the result should
    > be 00:00.
    >
    > I've tried to do the following:
    >
    > A1: 08:00 ' Start time
    > A2: 17:00 ' End time
    >
    > C1: 01:00 ' Normal lunch time
    > C2: 08:00 ' Normal working day
    >
    > =A2-A1-C1-C2 (Cell format set to time)
    >
    > This works when I work at least 8 hours a day but not if I work
    > less than 8
    > hours a day, then I get ###### in my cell.
    >
    > Can anyone help me with his? It should be simple, but I just
    > can't get it to
    > work...
    >
    > Thanks,
    >
    > Mats-Lennart
    >
    >




  3. #3
    Mats-Lennart Hansson
    Guest

    Re: Calculate time difference

    That should do it. Great site!

    Thanks,
    Mats-Lennart


    "Chip Pearson" <[email protected]> wrote in message
    news:OKNEJV#[email protected]...
    > See www.cpearson.com/excel/overtime.htm for example timesheet
    > formulas.
    >
    >
    > --
    > Cordially,
    > Chip Pearson
    > Microsoft MVP - Excel
    > Pearson Software Consulting, LLC
    > www.cpearson.com
    >
    >
    > "Mats-Lennart Hansson" <[email protected]> wrote in message
    > news:ep8T%23Q%[email protected]...
    > > Hi,
    > > I'm new to excel so I hope that you can help me. I want to make
    > > an excel
    > > file that calculates my working hours. If I for example writes
    > > 08:00 in one
    > > cell and 17:00 in another cell I want the result to be 00:00
    > > (since my
    > > working day is 1 hour and I have 1 hour lunch ->
    > > 17:00-08:00-08:00-01:00 =
    > > 00:00). This means that if I work from 08:00 to 16:00 the
    > > result should
    > > be -01:00 and if I work from 08:00 to 18:00 the result should
    > > be 00:00.
    > >
    > > I've tried to do the following:
    > >
    > > A1: 08:00 ' Start time
    > > A2: 17:00 ' End time
    > >
    > > C1: 01:00 ' Normal lunch time
    > > C2: 08:00 ' Normal working day
    > >
    > > =A2-A1-C1-C2 (Cell format set to time)
    > >
    > > This works when I work at least 8 hours a day but not if I work
    > > less than 8
    > > hours a day, then I get ###### in my cell.
    > >
    > > Can anyone help me with his? It should be simple, but I just
    > > can't get it to
    > > work...
    > >
    > > Thanks,
    > >
    > > Mats-Lennart
    > >
    > >

    >
    >




+ 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