Excel.Tips.Net ExcelTips (Menu Interface)

Inserting the Current Time with Seconds

Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Inserting the Current Time with Seconds.

As you have learned in other ExcelTips, you can use Ctrl+: (that's a colon) to enter the current time into a cell. The resulting cell value is equal to the hours and minutes of the current time. In other words, the seconds will always be zero.

If you want to insert the current time and have it include the seconds, the best way is to use a macro. You can then assign the macro to a keyboard shortcut or a toolbar button (or both) so it can be immediately popped into place. The following macro will do the trick nicely:

Sub TimeStamp()
    ActiveCell.Value = Time
    ActiveCell.NumberFormat = "h:mm:ss AM/PM"
End Sub

Notice that the time is placed in the cell, and then the cell is formatted to show hours, minutes, and seconds.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2012) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Inserting the Current Time with Seconds.

Related Tips:

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!


Leave your own comment:

  Notify me about new comments ONLY FOR THIS TIP
Notify me about new comments ANYWHERE ON THIS SITE
Hide my email address
*What is 5+3 (To prevent automated submissions and spam.)
           Commenting Terms

Comments for this tip:

Jose    18 Sep 2015, 13:37
First of all thank you very much, this has helped me tremendously. I was wondering is there any way to add something to this macro to be able to undo? Let me explain: whenever I use it the only way to remove it from a cell is to click on the cell and delete, the undo button says (Can't Undo (Ctrl+Z).
Mike O'Neill    09 Jan 2015, 08:58
Hi. If you do not want to use macros, then a simpler but less elegant option is to enter the formula
in the formula bar, then immediately press f9 <Enter> to fix the value. Make sure that the cells are formatted to show the seconds.

It is a short formula so not too much work. But if you need to do it multiple times you could first copy the =NOW() into the copy buffer, then use the following sequence of keystrokes to paste as follows:
<F2> <Paste> <F9> <Enter>
Where <Paste> is Ctrl-V or equivalent
murugarajan    23 Oct 2013, 19:39
I need to know the how to use vb screen
the menu option debug add,edit and quick watch

Our Company

Sharon Parq Associates, Inc.

About Tips.Net

Contact Us


Advertise with Us

Our Privacy Policy

Our Sites


Beauty and Style




DriveTips (Google Drive)

ExcelTips (Excel 97–2003)

ExcelTips (Excel 2007–2016)



Home Improvement

Money and Finances


Pests and Bugs

Pets and Animals

WindowsTips (Microsoft Windows)

WordTips (Word 97–2003)

WordTips (Word 2007–2016)

Our Products

Helpful E-books

Newsletter Archives


Excel Products

Word Products

Our Authors

Author Index

Write for Tips.Net

Copyright © 2016 Sharon Parq Associates, Inc.