getting seconds to show in cell

G

Guest

I would like to be able to record the current time in certain cells, by using
the ctrl+shift+; keys. I have went to "Format Cells" "Number" tab, Selected
"Time" and then chose the 24-hour display which included the seconds.
My problem is that when I hit ctrl+shift+; the seconds always show up "00,"
example: 14:25:00. Please let know if there is a way to get the current
second to show up on the time also. Excel 2007. Thanks!!!!!!!!!!!
 
G

Guest

Enter this small macro:

Sub william()
ActiveCell.NumberFormat = "[$-409]h:mm:ss AM/PM;@"
ActiveCell.Value = Now
End Sub

and assign the shortcut CNTRL-e to it.

Then click on a cell, touch CNTRL-e and the time (properly formatted) will
appear in the cell
 
G

Guest

Bingo!!!!!!!! Works great. Have a great weekend!!!!!!!!!!

Gary''s Student said:
Enter this small macro:

Sub william()
ActiveCell.NumberFormat = "[$-409]h:mm:ss AM/PM;@"
ActiveCell.Value = Now
End Sub

and assign the shortcut CNTRL-e to it.

Then click on a cell, touch CNTRL-e and the time (properly formatted) will
appear in the cell
--
Gary''s Student - gsnu200726


William said:
I would like to be able to record the current time in certain cells, by using
the ctrl+shift+; keys. I have went to "Format Cells" "Number" tab, Selected
"Time" and then chose the 24-hour display which included the seconds.
My problem is that when I hit ctrl+shift+; the seconds always show up "00,"
example: 14:25:00. Please let know if there is a way to get the current
second to show up on the time also. Excel 2007. Thanks!!!!!!!!!!!
 
G

Guest

Thank you sooooo much, Gary's Student. What does the "[$-409]" mean and why
that format?

Gary''s Student said:
Enter this small macro:

Sub william()
ActiveCell.NumberFormat = "[$-409]h:mm:ss AM/PM;@"
ActiveCell.Value = Now
End Sub

and assign the shortcut CNTRL-e to it.

Then click on a cell, touch CNTRL-e and the time (properly formatted) will
appear in the cell
--
Gary''s Student - gsnu200726


William said:
I would like to be able to record the current time in certain cells, by using
the ctrl+shift+; keys. I have went to "Format Cells" "Number" tab, Selected
"Time" and then chose the 24-hour display which included the seconds.
My problem is that when I hit ctrl+shift+; the seconds always show up "00,"
example: 14:25:00. Please let know if there is a way to get the current
second to show up on the time also. Excel 2007. Thanks!!!!!!!!!!!
 
G

Guest

I formatted a cell with the macro recorder turned on and that what I got!!
--
Gary''s Student - gsnu200730


cblanche said:
Thank you sooooo much, Gary's Student. What does the "[$-409]" mean and why
that format?

Gary''s Student said:
Enter this small macro:

Sub william()
ActiveCell.NumberFormat = "[$-409]h:mm:ss AM/PM;@"
ActiveCell.Value = Now
End Sub

and assign the shortcut CNTRL-e to it.

Then click on a cell, touch CNTRL-e and the time (properly formatted) will
appear in the cell
--
Gary''s Student - gsnu200726


William said:
I would like to be able to record the current time in certain cells, by using
the ctrl+shift+; keys. I have went to "Format Cells" "Number" tab, Selected
"Time" and then chose the 24-hour display which included the seconds.
My problem is that when I hit ctrl+shift+; the seconds always show up "00,"
example: 14:25:00. Please let know if there is a way to get the current
second to show up on the time also. Excel 2007. Thanks!!!!!!!!!!!
 
D

Dave Peterson

Debra Dalgleish posted this:

Creating international number formats
http://office.microsoft.com/en-us/excel/HA010346351033.aspx
Thank you sooooo much, Gary's Student. What does the "[$-409]" mean and why
that format?

Gary''s Student said:
Enter this small macro:

Sub william()
ActiveCell.NumberFormat = "[$-409]h:mm:ss AM/PM;@"
ActiveCell.Value = Now
End Sub

and assign the shortcut CNTRL-e to it.

Then click on a cell, touch CNTRL-e and the time (properly formatted) will
appear in the cell
--
Gary''s Student - gsnu200726


William said:
I would like to be able to record the current time in certain cells, by using
the ctrl+shift+; keys. I have went to "Format Cells" "Number" tab, Selected
"Time" and then chose the 24-hour display which included the seconds.
My problem is that when I hit ctrl+shift+; the seconds always show up "00,"
example: 14:25:00. Please let know if there is a way to get the current
second to show up on the time also. Excel 2007. Thanks!!!!!!!!!!!
 

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