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.
- Reuse Anything: Add the most used or complex formulas, charts and anything else to your favorites, and quickly reuse them in the future.
- More than 20 text features: Extract Number from Text String; Extract or Remove Part of Texts; Convert Numbers and Currencies to English Words.
- Merge Tools: Multiple Workbooks and Sheets into One; Merge Multiple Cells/Rows/Columns Without Losing Data; Merge Duplicate Rows and Sum.
- Split Tools: Split Data into Multiple Sheets Based on Value; One Workbook to Multiple Excel, PDF or CSV Files; One Column to Multiple Columns.
- Paste Skipping Hidden/Filtered Rows; Count And Sum by Background Color; Send Personalized Emails to Multiple Recipients in Bulk.
- Super Filter: Create advanced filter schemes and apply to any sheets; Sort by week, day, frequency and more; Filter by bold, formulas, comment...
- More than 300 powerful features; Works with Office 2007-2021 and 365; Supports all languages; Easy deploying in your enterprise or organization.
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.