View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default Excel: How to insert current time (static) to the nearest second?

Try this one-line macro:

Sub time_it()
Selection.Value = Now
End Sub

you can assign a shortcut like CNTRL-e to it.
--
Gary''s Student - gsnu200720


"gwm" wrote:

When inserting the current time you press CTRL + SHIFT + ; and it displays it
in hours and minutes only. By formatting the cell to display seconds, it will
give 00 seconds rather than more specific time to the nearest second. Can
this function be adjusted to be more precise and display time to the nearest
second rather than just the nearest minute? Note: The "=NOW()" function does
display time to the nearest second, but I cannot use it in this case because
it is not static (i.e. updates).