getting seconds to show in cell

  • Thread starter Thread starter Guest
  • Start date Start date
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!!!!!!!!!!!
 
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
 
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!!!!!!!!!!!
 
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!!!!!!!!!!!
 
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!!!!!!!!!!!
 
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!!!!!!!!!!!
 
Back
Top