excel - Adding parts of a second to time -


i writing excel vba script, , add parts of second time extracted cell.

i using time function divide content 2, , convert using time function, , add result current time.

tt = time(0, 0, cells(1, 12) / 2) 

i type mismatch error, result of division not integer.

what @ end perform following addition.

newtime = timecurrent + tt  

is there alternative time function used in case ?

consider:

sub timeonmyhands()     dim tt date     tt = timeserial(0, 0, cint(cells(1, 12).value / 2))     msgbox format(tt, "hh:mm:ss.000") end sub 

assuming cell contains seconds simple number rather time value.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -