View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
joeu2004[_2_] joeu2004[_2_] is offline
external usenet poster
 
Posts: 829
Default single cell time entry as time - time; Ever seen this?

PS.... "Claus Busch" wrote:
Another workaround is rounding while changing string to time:
=ROUND(LEFT(A2,FIND(" -",A2)-1)*1440,0)/1440
is exactly Time(7,,)


There is some risk of infinitesimal differences. For example:

A2: 7:19 - 8:00
B2: =ROUND(LEFT(A2,FIND(" -",A2)-1)*1440,0)/1440
C2: =--TEXT(LEFT(A2,FIND(" -",A2)-1),"hh:mm")
D2: =B2-TIME(7,19,0)=0
E2: =C2-TIME(7,19,0)=0

D2 is FALSE. E2 is TRUE.