+ Reply to Thread
Results 1 to 25 of 25

time subtraction problem

  1. #1
    Govind
    Guest

    Re: time subtraction problem

    Hi,

    Lets say your start time is in cell A1 and end time is in B1, use the
    formula

    =IF(B1<A1,B1+1-A1,B1-A1)

    and format the cell in the time format you wish.

    Regards

    Govind.

    a wrote:
    > I have two times,
    > 22:19 pm and 1:50 am
    > obviously 1:50 is after 22:19 but when I try to subtract it --> 22:19 -
    > 1:50
    > excel gives me gibberish.
    >
    > thnks.


  2. #2
    Bob Phillips
    Guest

    Re: time subtraction problem


    <a> wrote in message news:[email protected]...

    > both formulae worked,
    > but I would prefer the IF statement even though its abit longer.
    > since it applies to both cases of A1 > B1 or B1 > A1, i can drag the

    formula
    > down the whole column.


    and mine doesn't?



  3. #3
    Bob Phillips
    Guest

    Re: time subtraction problem

    =MOD(B1-A1,1)

    --
    HTH

    Bob Phillips

    <a> wrote in message news:[email protected]...
    > I have two times,
    > 22:19 pm and 1:50 am
    > obviously 1:50 is after 22:19 but when I try to subtract it --> 22:19 -

    1:50
    > excel gives me gibberish.
    >
    > thnks.
    >




  4. #4
    Guest

    Re: time subtraction problem

    thanks.

    both formulae worked,
    but I would prefer the IF statement even though its abit longer.
    since it applies to both cases of A1 > B1 or B1 > A1, i can drag the formula
    down the whole column.

    BTW, what does (time + 1) do to the smaller time?

    thnks.


  5. #5
    Roger Govier
    Guest

    Re: time subtraction problem

    You can also copy Bob's formula down the column. It will work with both
    cases.

    --
    Regards
    Roger Govier
    <a> wrote in message news:[email protected]...
    > thanks.
    >
    > both formulae worked,
    > but I would prefer the IF statement even though its abit longer.
    > since it applies to both cases of A1 > B1 or B1 > A1, i can drag the
    > formula down the whole column.
    >
    > BTW, what does (time + 1) do to the smaller time?
    >
    > thnks.




  6. #6
    Govind
    Guest

    Re: time subtraction problem

    Hi,

    Thanks for the feedback. The +1 adds one day to the smaller time.

    Govind.

    a wrote:
    > thanks.
    >
    > both formulae worked,
    > but I would prefer the IF statement even though its abit longer.
    > since it applies to both cases of A1 > B1 or B1 > A1, i can drag the
    > formula down the whole column.
    >
    > BTW, what does (time + 1) do to the smaller time?
    >
    > thnks.


  7. #7
    Bob Phillips
    Guest

    Re: time subtraction problem


    <a> wrote in message news:[email protected]...

    > both formulae worked,
    > but I would prefer the IF statement even though its abit longer.
    > since it applies to both cases of A1 > B1 or B1 > A1, i can drag the

    formula
    > down the whole column.


    and mine doesn't?



  8. #8
    Govind
    Guest

    Re: time subtraction problem

    Hi,

    Lets say your start time is in cell A1 and end time is in B1, use the
    formula

    =IF(B1<A1,B1+1-A1,B1-A1)

    and format the cell in the time format you wish.

    Regards

    Govind.

    a wrote:
    > I have two times,
    > 22:19 pm and 1:50 am
    > obviously 1:50 is after 22:19 but when I try to subtract it --> 22:19 -
    > 1:50
    > excel gives me gibberish.
    >
    > thnks.


  9. #9
    Roger Govier
    Guest

    Re: time subtraction problem

    You can also copy Bob's formula down the column. It will work with both
    cases.

    --
    Regards
    Roger Govier
    <a> wrote in message news:[email protected]...
    > thanks.
    >
    > both formulae worked,
    > but I would prefer the IF statement even though its abit longer.
    > since it applies to both cases of A1 > B1 or B1 > A1, i can drag the
    > formula down the whole column.
    >
    > BTW, what does (time + 1) do to the smaller time?
    >
    > thnks.




  10. #10
    Bob Phillips
    Guest

    Re: time subtraction problem

    =MOD(B1-A1,1)

    --
    HTH

    Bob Phillips

    <a> wrote in message news:[email protected]...
    > I have two times,
    > 22:19 pm and 1:50 am
    > obviously 1:50 is after 22:19 but when I try to subtract it --> 22:19 -

    1:50
    > excel gives me gibberish.
    >
    > thnks.
    >




  11. #11
    Govind
    Guest

    Re: time subtraction problem

    Hi,

    Thanks for the feedback. The +1 adds one day to the smaller time.

    Govind.

    a wrote:
    > thanks.
    >
    > both formulae worked,
    > but I would prefer the IF statement even though its abit longer.
    > since it applies to both cases of A1 > B1 or B1 > A1, i can drag the
    > formula down the whole column.
    >
    > BTW, what does (time + 1) do to the smaller time?
    >
    > thnks.


  12. #12
    Guest

    Re: time subtraction problem

    thanks.

    both formulae worked,
    but I would prefer the IF statement even though its abit longer.
    since it applies to both cases of A1 > B1 or B1 > A1, i can drag the formula
    down the whole column.

    BTW, what does (time + 1) do to the smaller time?

    thnks.


  13. #13
    Bob Phillips
    Guest

    Re: time subtraction problem


    <a> wrote in message news:[email protected]...

    > both formulae worked,
    > but I would prefer the IF statement even though its abit longer.
    > since it applies to both cases of A1 > B1 or B1 > A1, i can drag the

    formula
    > down the whole column.


    and mine doesn't?



  14. #14
    Roger Govier
    Guest

    Re: time subtraction problem

    You can also copy Bob's formula down the column. It will work with both
    cases.

    --
    Regards
    Roger Govier
    <a> wrote in message news:[email protected]...
    > thanks.
    >
    > both formulae worked,
    > but I would prefer the IF statement even though its abit longer.
    > since it applies to both cases of A1 > B1 or B1 > A1, i can drag the
    > formula down the whole column.
    >
    > BTW, what does (time + 1) do to the smaller time?
    >
    > thnks.




  15. #15
    Govind
    Guest

    Re: time subtraction problem

    Hi,

    Thanks for the feedback. The +1 adds one day to the smaller time.

    Govind.

    a wrote:
    > thanks.
    >
    > both formulae worked,
    > but I would prefer the IF statement even though its abit longer.
    > since it applies to both cases of A1 > B1 or B1 > A1, i can drag the
    > formula down the whole column.
    >
    > BTW, what does (time + 1) do to the smaller time?
    >
    > thnks.


  16. #16
    Guest

    Re: time subtraction problem

    thanks.

    both formulae worked,
    but I would prefer the IF statement even though its abit longer.
    since it applies to both cases of A1 > B1 or B1 > A1, i can drag the formula
    down the whole column.

    BTW, what does (time + 1) do to the smaller time?

    thnks.


  17. #17
    Bob Phillips
    Guest

    Re: time subtraction problem

    =MOD(B1-A1,1)

    --
    HTH

    Bob Phillips

    <a> wrote in message news:[email protected]...
    > I have two times,
    > 22:19 pm and 1:50 am
    > obviously 1:50 is after 22:19 but when I try to subtract it --> 22:19 -

    1:50
    > excel gives me gibberish.
    >
    > thnks.
    >




  18. #18
    Govind
    Guest

    Re: time subtraction problem

    Hi,

    Lets say your start time is in cell A1 and end time is in B1, use the
    formula

    =IF(B1<A1,B1+1-A1,B1-A1)

    and format the cell in the time format you wish.

    Regards

    Govind.

    a wrote:
    > I have two times,
    > 22:19 pm and 1:50 am
    > obviously 1:50 is after 22:19 but when I try to subtract it --> 22:19 -
    > 1:50
    > excel gives me gibberish.
    >
    > thnks.


  19. #19
    Govind
    Guest

    Re: time subtraction problem

    Hi,

    Thanks for the feedback. The +1 adds one day to the smaller time.

    Govind.

    a wrote:
    > thanks.
    >
    > both formulae worked,
    > but I would prefer the IF statement even though its abit longer.
    > since it applies to both cases of A1 > B1 or B1 > A1, i can drag the
    > formula down the whole column.
    >
    > BTW, what does (time + 1) do to the smaller time?
    >
    > thnks.


  20. #20
    Roger Govier
    Guest

    Re: time subtraction problem

    You can also copy Bob's formula down the column. It will work with both
    cases.

    --
    Regards
    Roger Govier
    <a> wrote in message news:[email protected]...
    > thanks.
    >
    > both formulae worked,
    > but I would prefer the IF statement even though its abit longer.
    > since it applies to both cases of A1 > B1 or B1 > A1, i can drag the
    > formula down the whole column.
    >
    > BTW, what does (time + 1) do to the smaller time?
    >
    > thnks.




  21. #21
    Guest

    Re: time subtraction problem

    thanks.

    both formulae worked,
    but I would prefer the IF statement even though its abit longer.
    since it applies to both cases of A1 > B1 or B1 > A1, i can drag the formula
    down the whole column.

    BTW, what does (time + 1) do to the smaller time?

    thnks.


  22. #22
    Bob Phillips
    Guest

    Re: time subtraction problem

    =MOD(B1-A1,1)

    --
    HTH

    Bob Phillips

    <a> wrote in message news:[email protected]...
    > I have two times,
    > 22:19 pm and 1:50 am
    > obviously 1:50 is after 22:19 but when I try to subtract it --> 22:19 -

    1:50
    > excel gives me gibberish.
    >
    > thnks.
    >




  23. #23
    Bob Phillips
    Guest

    Re: time subtraction problem


    <a> wrote in message news:[email protected]...

    > both formulae worked,
    > but I would prefer the IF statement even though its abit longer.
    > since it applies to both cases of A1 > B1 or B1 > A1, i can drag the

    formula
    > down the whole column.


    and mine doesn't?



  24. #24
    Govind
    Guest

    Re: time subtraction problem

    Hi,

    Lets say your start time is in cell A1 and end time is in B1, use the
    formula

    =IF(B1<A1,B1+1-A1,B1-A1)

    and format the cell in the time format you wish.

    Regards

    Govind.

    a wrote:
    > I have two times,
    > 22:19 pm and 1:50 am
    > obviously 1:50 is after 22:19 but when I try to subtract it --> 22:19 -
    > 1:50
    > excel gives me gibberish.
    >
    > thnks.


  25. #25
    Guest

    time subtraction problem

    I have two times,
    22:19 pm and 1:50 am
    obviously 1:50 is after 22:19 but when I try to subtract it --> 22:19 - 1:50
    excel gives me gibberish.

    thnks.


+ 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