How to insert countdown timer in Excel?
If you want to handle with some data in a limited time, you can insert a countdown timer in your data worksheet, and when finish the time countdown, there will be a popped out dialog to remind you. Here I will tell you a VBA code to insert a countdown timer in Excel.
Insert countdown timer in Excel
Insert countdown timer in Excel
In Excel, it cannot countdown time, but you can copy the follow VBA code to help counting down the time.
1. Select a cell and format it as time formatting by right clicking at the cell and selecting Format Cells, then in the dialog, clicking Time and selecting 13:30:55 in the Type list, at last clicking OK to exit this dialog. See screenshot:
2. Type the time you want to countdown into the formatting cell. See screenshot:
3. Press Alt + F11 keys to open Microsoft Visual Basic for Applications window.
4. Click Insert > Module and then copy following VBA into the new window.
VBA: Countdown timer.
Dim gCount As Date
'Updateby20140925
Sub Timer()
gCount = Now + TimeValue("00:00:01")
Application.OnTime gCount, "ResetTime"
End Sub
Sub ResetTime()
Dim xRng As Range
Set xRng = Application.ActiveSheet.Range("E1")
xRng.Value = xRng.Value - TimeSerial(0, 0, 1)
If xRng.Value <= 0 Then
MsgBox "Countdown complete."
Exit Sub
End If
Call Timer
End Sub
Tip: E1 in the above code indicates the time cell you type in the step 2.
5. Click Run button or press F5 to run the countdown timer. Now the time is counted down.
6. And when the countdown is finished, a popped out dialog will remind you.
Tip: You cannot stop the countdown when it is running except closing the workbook.
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!