Share via

I want to add live countdown timers to an Excel spreadsheet that I use to track my assignments and how much time I have to work on them before I turn them in.

Anonymous
2023-06-22T03:08:28+00:00

I would like to add multiple live countdown timers to an Excel spreadsheet that helps me track my assignments. The purpose of the countdown timers would be to help me keep track of how much time I would have left to work on an assignment before it is due. The countdown timers would be based off a deadline that I would enter in a separate cell. The idea is that once I populate the deadline in one cell, the countdown timer would automatically calculate (and keep counting down live) in its respective cell.

I tried using the "NOW()" function by subtracting the deadline by the current time to give me the time remaining. It does just that - but it is not a live countdown. The result is a static figure, and I would like it to be dynamic.

Thank yuou.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

4 answers

Sort by: Most helpful
  1. Anonymous
    2023-06-22T04:06:38+00:00

    Hi MJL4000, I'm Femi and I'd be happy to help you with your question. To add live countdown timers to an Excel spreadsheet, kindly follow the steps below: Open your Excel worksheet where you want to add the countdown timers. In one column, enter the deadlines or due dates for your assignments. In the adjacent column where you want the countdown timers to appear, select the cells where you want the timers and assign them a named range. To do this, select the cells and enter a name for the range in the "Name Box" (located next to the formula bar). For example, you can name the range "CountdownTimers". Press "Alt+F11" to open the VBA editor. In the VBA editor, double-click on the sheet module corresponding to the worksheet where you want the countdown timers. In the sheet module, paste the following VBA code: Private Sub Worksheet_Change(ByVal Target As Range) Dim rng As Range Dim cell As Range

    ' Define the range of countdown timer cells Set rng = Range("CountdownTimers")

    ' Check if the changed cell is within the countdown timer range If Not Intersect(Target, rng) Is Nothing Then ' Disable events temporarily to avoid infinite loop Application.EnableEvents = False

    ' Loop through each cell in the range For Each cell In rng ' Calculate the remaining time until the deadline If cell. Offset(0, -1). Value <> "" Then cell. Value = cell. Offset(0, -1). Value - Now() cell. NumberFormat = "hh:mm:ss" Else cell. Value = "" End If Next cell

    ' Enable events again Application.EnableEvents = True End If End Sub

    Close the VBA editor. Now, whenever you enter or change a deadline in the adjacent cell, the corresponding countdown timer cell will automatically update and display the live countdown. Kindly ensure you modify the range "CountdownTimers" in the VBA code to match the named range you assigned to your countdown timer cells.

    Hope this helps!

    Best Regards, Femi

    3 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2023-06-24T06:47:17+00:00

    Glad to have been of help!

    0 comments No comments
  3. Anonymous
    2023-06-24T01:02:12+00:00

    Thank you!

    0 comments No comments
  4. Andreas Killer 144.1K Reputation points Volunteer Moderator
    2023-06-22T04:02:56+00:00

    Well, in theory all you have to do is to call a macro that is executed every second that recalculates that formula.

    The problem with these macros is that they disrupt the behavior and therefore your work in Excel. And they are not executed if you edit a cell!

    Trust me, it's easier and much better to press F9 once to recalculate the formula.

    Andreas.

    0 comments No comments