Display Seconds when inserting time in cells

G

Guest

Hello
I'm using the CTRL+SHIFT+; to insert time into a cell. I have formatted the
cell to display HH:mm:ss, but seconds are only displayed as Zeroes and never
update.

Can you please tell me how to stamp time including seconds?

Thanks
 
D

David Biddulph

Use =NOW(), then paste special/ values to keep the data without further
recalculation.
 
D

Dave Peterson

You could use a macro that "steals" the ctrl-shift-colon keystroke.

If you want to try, create a workbook that includes this code and store it in
your XLStart folder. Lots of people use a workbook named Personal.xls for this
kind of thing.

Option Explicit
Sub Auto_Open()
Application.OnKey "+^:", "'" & ThisWorkbook.Name & "'!Nowtime"
End Sub
Sub Auto_Close()
Application.OnKey "+^:"
End Sub
Sub NOWTIME()
On Error Resume Next
With Selection
.Value = Now
.NumberFormat = "hh:mm:ss"
End With
If Err.Number <> 0 Then
Beep
End If
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 
G

Guest

Thanks for the macro -- it works great, and the web page stepped me through
how to load it.

I am totally new to Excel macros, and am interested how you knew which
functions to use? I am trying to use "help" in Excel, but I kind of have to
know what I'm looking for!
 
D

Dave Peterson

It may be time to get a reference book.

I don't think you can go wrong by starting with John Walkenbach's books.

Debra Dalgleish has a list of books at her site:
http://www.contextures.com/xlbooks.html

See if you can find them in your local bookstore/internet site and you can
choose what one you like best.
Thanks for the macro -- it works great, and the web page stepped me through
how to load it.

I am totally new to Excel macros, and am interested how you knew which
functions to use? I am trying to use "help" in Excel, but I kind of have to
know what I'm looking for!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top