countdown timer

okjectivity

New Member
Joined
Jul 25, 2022
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi everyone,

Thanks for the incredible community you built here. This is my first post ever :)

I'm trying to make a countdown timer (in minutes and seconds, mm:ss) that can show tenths of seconds in the last minute (ss.0). I thought it could be possible since excel seems to have milliseconds, but I don't succeed. Does anybody know if it's possible? If so, any clue as to how to do it?

Thanks so much, everyone
All the best
Mik
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Welcome to the MrExcel Forum. I don't know how much this will help you, but when I want to time how long it takes for a code to run, I use this. The number of decimal places of the Seconds in determined by the Round Function.

VBA Code:
Sub Codetimer()

    Dim StartTime As Double
    Dim SecondsElapsed As Double

   'Remember time when macro starts
    StartTime = Timer

    'YOUR CODE HERE

    'Determine how many seconds code took to run
    SecondsElapsed = Round(Timer - StartTime, 2)

    'Notify user in seconds
    MsgBox "This code ran successfully in " & SecondsElapsed & " seconds", vbInformation
    
End Sub

I hope this helps.
 
Upvote 0
thanks a lot! will give this approach a try and will keep you posted. Thanks so much for the feedback, igold!
 
Upvote 0
You're welcome, I was happy to help. I was hoping that this would give you a jump start to what you are tying to accomplish. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,708
Messages
6,174,006
Members
452,542
Latest member
Bricklin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top