Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Hi
Cell A1 & Cell B1 is having time format of 24hrs, h:mm, I have put the data in A1 as 23.30 pm & in B1 1.30 am, difference between these two time is 2 hrs, .I have tried all the formula hour, time etc but didn't get the correct value. Please suggest me the right formula to use here. Thank you Sunita |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Sunita,
Am Fri, 19 Oct 2012 10:55:41 +0000 schrieb Sunita23: Cell A1 & Cell B1 is having time format of 24hrs, h:mm, I have put the data in A1 as 23.30 pm & in B1 1.30 am, difference between these two time is 2 hrs, .I have tried all the formula hour, time etc but didn't get the correct value. try: =MOD(B1-A1,1) Regards Claus Busch -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Sunita,
Am Fri, 19 Oct 2012 15:48:48 +0200 schrieb Claus Busch: =MOD(B1-A1,1) if you want an integer instead of time then: =24*MOD(B1-A1,1) and format the cell with the result as "General" Regards Claus Busch -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
#4
![]() |
|||
|
|||
![]()
Hi
Or just add 1: =(1+B1)-A1 |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Kevin,
Am Sat, 20 Oct 2012 06:35:46 +0000 schrieb : Or just add 1: =(1+B1)-A1 the MOD formula works with dayshift *and* with nightshift. With dayshift your formula has 24 hours to many. It *shows* the real result but if you format the cell [h]:mm you will see it. Regards Claus Busch -- Win XP PRof SP2 / Vista Ultimate SP2 Office 2003 SP2 /2007 Ultimate SP2 |
#6
![]() |
|||
|
|||
![]()
Yes mate, I am well aware of that! As you well know there are many ways to skin a cat. So for the OP I was pointing out another option!
Another version, bit longer then the MOD: =IF(B1<A1,1+B1,B1)-A1 Quote:
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula to convert range of time into 1 hour increment | Excel Discussion (Misc queries) | |||
Time formula (difference of predicted and actual time) | Excel Discussion (Misc queries) | |||
changing time formula from 16 hour days to 24 | Excel Programming | |||
How can I use a time difference in a subsequent formula in Excel? | Excel Worksheet Functions | |||
Calculate time difference to the half hour | Excel Worksheet Functions |