How to Create a Countdown Timer in Excel (with Easy Steps)

Step 1: Display the Countdown Timer

  • Select cell B4.
  • Go to the Home tab.
  • From the Font group, pick the B icon to bold.
  • Set the font size to 20.

Display the Countdown Timer

  • Click the All border symbol.
  • Choose the Blue Lighter 80% as the Fill Color and the Font Color as Black.
  • From the Alignment group, select Middle and Center.

  • We will get the intended clock as below.

Display the Countdown Timer

Read More: How to Use VBA Code for Creating Digital Clock in Excel


Step 2: Build a Macro to Start the Countdown

  • Go to the Developer tab, followed by Visual Basic.

Build a Macro to Start the Countdown Timer in Excel

  • Click the Insert and then Module to get a Module Box.

  • Enter the following code in the Module Box:
Public period As Date
Sub StartClock()
period = Now + TimeValue("00:00:01")
If Range("B4").Value = 0 Then Exit Sub
Range("B4") = Range("B4") - TimeValue("00:00:01")
Application.OnTime period, "StartClock"
End Sub
  • In this case, we titled StartClock as the Procedure Name. This Macro is responsible for starting the Timer App.
  • Press the Ctrl+S key.

Read More: How to Create Timer Event with VBA in Excel


Step 3: Establish Another Macro to Reset the Timer

  • Open the same Module.
  • Enter the following code in the Module Box:
Sub ResetClock()
Range("B4") = TimeValue("00:00:5")
End Sub
  • We labeled ResetClock as the Procedure Name. The Macro here can reset the Clock.
  • Press Ctrl+S.

Establish Another Macro to Reset the Countdown Timer in Excel


Step 4: Generate the Last Macro to Stop

  • Open the Module. In our study, it is called Module1.
  • Enter the following code in the Module Box to create another Macro titled StopClock for this demo:
Sub StopClock()
Application.OnTime EarliestTime:=period, Procedure:="StartClock", Schedule:=False
End Sub
  • We used this Macro to stop the Timer App.
  • Press the Ctrl+S key.

Generate Last Macro to STOP the Countdown Time in Excel


Step 5: Set Buttons to Use the Timer

  • Go to the Developer tab.
  • From the Controls group, click the Insert icon.

Set Buttons to Use the Countdown Timer in Excel

  • A tiny bar will appear.
  • From the Form Controls, choose the Button symbol.

  • Draw a rectangle right below the B4 cell.
  • The Assign Macro window will pop up.
  • Choose the StartClock procedure, followed by OK.

Set START Button for the Countdown Timer in Excel

  • Rename the button. In this case, START.
  • Select the text, bold it, and increase its size to 20.

Set START Button for the Countdown Timer in Excel

  • Create another button for the reset purpose.
  • Draw and place this button below Button 1.
  • The Assign Macro will come up.
  • Choose the Macro titled ResetClock, followed by OK.

Set RESET Button for the Countdown Timer in Excel

  • Rename the button. In this scenario, RESET.
  • Bold the text and raise its size to 20.

Set RESET Button for the Countdown Timer in Excel

  • Construct an additional stop button.
  • Draw this button and place it beneath Button 2.
  • The Assign Macro dialogue box will appear.
  • Select the StopClock sub-procedure, followed by OK.

Set STOP Button for the Countdown Timer in Excel

  • Change the button’s name. In this situation, STOP.
  • Pick the text, bold it, and make its size 20.

  • The Countdown Timer will display like below.


Step 6: Test the Countdown Timer

  • Click the RESET button.
  • Press START.
  • Click the STOP button.
  • Reset the Countdown Timer again.
  • Click the START button.
  • The Countdown Time is working perfectly.


Download the Practice Workbook

Download the workbook to practice.


Related Articles

Get FREE Advanced Excel Exercises with Solutions!
Lutfor Rahman Shimanto
Lutfor Rahman Shimanto

Lutfor Rahman Shimanto, BSc, Information Technology, Jahangirnagar University, Bangladesh, has worked with the ExcelDemy project for over a year. He has written 50+ articles and provided solutions of 100+ comments for ExcelDemy. Currently, he works as an Excel & VBA Developer and provides support and solutions in the ExcelDemy Forum. He has solved 100+ ExcelDemy Forum problems. His work and learning interests are in developing various Excel & VBA and Desktop applications. Outside of work, he enjoys Chess... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo