Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Inserting the Current Time with Seconds.
Written by Allen Wyatt (last updated May 1, 2021)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365
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 add it to the Quick Access Toolbar (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.
Note:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (10635) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Inserting the Current Time with Seconds.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
It can be frustrating when you get error messages doing something that you previously did with no errors. If you get an ...
Discover MoreWorkbooks can contain macros, or not. It is entirely up to you whether they do or not, but at some future time you might ...
Discover MoreNeed to pull a list of words from a range of cells? This tip shows how easy you can perform the task using a macro.
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2021-05-01 16:24:20
J. Conklin
If you want to insert the current time with seconds but without a macro, do the following:
1) set the cell to have the following custom format: dd-mmm-yyyy hh:mm:ss
I use "military" or "European" date format since that's the one used when I'm working on genealogy. If you prefer U.S. date format, set the custom format to mmm-dd-yyyy
2) in that cell, enter =NOW()
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments