How to display time in real time in Excel

Опубликовано: 28 Декабрь 2025
на канале: Global Excel Summit
328
8

Returning the current time precise to the second can be done by using the NOW function in a cell that has the Time number format applied.

The problem is =NOW() will only return a snapshot rather than update in real time. This means it's inaccurate a second after the formula is confirmed.

Unfortunately, this is a limitation of Excel's calculation engine.

You can tap F9 to get the latest time or hold it down to see the seconds update for as long as you do.

But let's face it, neither method is practical nor desirable.

The solution involves VBA. Carry out the following steps:

1. On the Developer tab, go to the Insert dropdown and choose Button.
2. Draw the button on the worksheet to open the Assign Macro window.
3. Name the macro 'StartStopTime' and click New.
4. In the module window, use this code:

Public IsRunning As Boolean

Sub StartStopTime()

If IsRunning Then
IsRunning = False
Else
IsRunning = True

On Error Resume Next

Do While IsRunning
DoEvents
Sheet1.Range("A1").Value = TimeValue(Now)
Loop

End If

End Sub

5. Go back into the main window and click the button to run the macro.

What happens? The time updates in real time! Another click freezes the time.

There are many things you could use this for, whether it's an alarm clock or a task scheduler.

If only we could do this without VBA…

#exceleration #excel #globalexcelsummit

---

The Global Excel Summit is the world's largest gathering of Microsoft Excel users and experts.

Find us on:

🌐 Website: https://globalexcelsummit.com
👔 LinkedIn:   / global-excel-summit  
🆇 X: https://x.com/ExcelSummit
🤳 TikTok:   / globalexcelsummit  
📸 Instagram:   / globalexcelsummit  
🟦 Facebook:   / globalexcelsummit  
🧵 Threads: https://www.threads.net/@globalexcels...