View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
oldchippy[_14_] oldchippy[_14_] is offline
external usenet poster
 
Posts: 1
Default Military time caculation help needed


azdps Wrote:
Thank you oldchippy and daddylonglegs both versions worked like a charm.
I have one issue I need resolved now that I forgot to orginally mention.
If my time falls on a new day the calculations that you provided don't
work correctly. The calculation would provide a negative number since
B1 appears to be a lower number than A1, but actually its just the next
day. Example:

A1 = *2330*
B1 = *0140*
C1 = *2.2*

Hi azdps,

Sorry for delay in getting back to you, but if you still want an
answer, this takes into account for times going into the next twenty
four hours

=IF(LEFT(A1,2)*1LEFT(B1,2)*1,ROUNDUP((2360-LEFT(A1,4)*1+RIGHT(B1,2)*1)/6,0.05)/10+LEFT(B1,2)*1,LEFT(B1,2)*1-LEFT(A1,2)*1+ROUNDUP((RIGHT(B1,2)*1-RIGHT(A1,2)*1)/6,0.5)/10)

oldchippy :)


--
oldchippy
------------------------------------------------------------------------
oldchippy's Profile: http://www.excelforum.com/member.php...o&userid=19907
View this thread: http://www.excelforum.com/showthread...hreadid=569113