Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
=MOD(B1-A1,1)
-- HTH Bob Phillips <a wrote in message ... 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. |
#3
![]() |
|||
|
|||
![]()
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. |
#4
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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. |
#6
![]() |
|||
|
|||
![]()
You can also copy Bob's formula down the column. It will work with both
cases. -- Regards Roger Govier <a wrote in message ... 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
![]() |
|||
|
|||
![]() <a wrote in message ... 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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
LOCK TIME | Excel Discussion (Misc queries) | |||
Time Sheets | Excel Discussion (Misc queries) | |||
subtraction with time format cells | Excel Worksheet Functions | |||
Help - Information with time and date | Excel Discussion (Misc queries) | |||
Problem with time calc | Excel Worksheet Functions |