View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default Convert number to time

Nick,
There is an error in the example you looked at (a "<" missing in
the IF statement ...A31000 should be A3<1000).

The following works OK with cell formatted as hh:mm

=IF(A1<1000,TIMEVALUE(LEFT(A1,1)&":"&RIGHT(A1,2)), TIMEVALUE(LEFT(A1,2)&":"&RIGHT(A1,2)))

HTH

"NCSemon" wrote:


Hi all,

I cannot figure out how to convert a number to time format (eg: 1340 to
13:40). I've tried following the directions 'here'
(http://www.exceltip.com/st/Convertin...Value/99.html),
but there seems to be an error in the IF statement (no logic check?). I
can't seem to fix it. Any help would be greatly appreciated.

Thanks in advance,
Nick


--
NCSemon
------------------------------------------------------------------------
NCSemon's Profile: http://www.excelforum.com/member.php...o&userid=35999
View this thread: http://www.excelforum.com/showthread...hreadid=557869