How to insert timestamp with seconds in Excel?
For working with expense, investments, and invoices in Excel, you may need to insert timestamp. In general, the timestamp you insert are formatted as hh:mm by default, but how can you insert the timestamp as hh:mm:ss?
Here only a VBA can help you insert current timestamp with seconds.
1. Select the cell you want to insert timestamp, and press Alt + F11 keys to enable Microsoft Visual Basic for Applications window.
2. Click Insert > Module, and paste below VBA to the new Module window.
VBA: Insert timestamp with seconds
Sub TimeStamp() ActiveCell.Value = Time ActiveCell.NumberFormat = "h:mm:ss AM/PM" End Sub
3. Press F5 key or click Run button to insert the timestamp. See screenshot:
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!