MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Date/Time formula

Posted by Bob on February 14, 2002 10:24 AM

I am trying to determine how many hours have past from a certain date and time to another.

Current formula: =I2+"24:00"*(J2-1)+("24:00"-D2) where I2 is End Time, J2 is number of midnights past, D2 is Begin Time. The result of this formula is 24 hours short if 1 midnight has past, 48 hours short if 2 have past and so on.

Am I going at this the wrong way? Any help would be greatly appreciated!

Posted by IML on February 14, 2002 10:59 AM

If you have time and dates in the cell, simply use
where A2 is the later date.

good luck

Posted by Mark W. on February 14, 2002 12:33 PM

You could also...

...use =I2-D2 and format the cell containing this
formula as [h]:mm