• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Timer in Excel

SUBROTO DE

New Member
How Can You run a timer in Excel?

Condition

................

The Timer starts when A Cell has a certain 9 digit code and stops it when an another Cell has a YES, besides it should pause if a different third Cell has a value "Pause or "P"".
 
Hi, SUBROTO DE!


Excel hasn't neither a timer function nor a timer control for use within macros -VBA, Visual Basic for Applications- as Visual Basic programming language has.

So you'll have to simulate it with many helper columns storing the date & time from event Worksheet_Change and then performing the final calculations with formulas in Excel. You should use one for accumulated time, another for starting time (when entering data in column A), another for stopping time (when entering YES in another column), and choose if using these two last for pausing or you use another pair.


Regards!
 
Whilst what SirJB7 has said above is true, there is a wrok around available.


Try the code below to see the message box every 5 seconds, you may adjust the timer as per your needs.

[pre]
Code:
Sub RunThis()

'to enable this timer everytime the workbook is opened
'you would need to call this procedure in the workbook open event

Application.OnTime Now + TimeValue("00:00:05"), "my_Procedure"

End Sub

Sub my_Procedure()
MsgBox "I will be shown every 5 seconds"
RunThis
End Sub
[/pre]

HTH

~VijaySharma
 
Hi, vijaySharma!


I suggested SUBROTO DE to use helper columns and Change events because I couldn't imagine how to implement a programmable delayed in time event -as the OnTime method handles- to perform a start time counter, pause it, restart it and stop it.


Regards!
 
Subroto,


Could you please put some more light on your requirements, start and stop makes sense to me, Pause does not.


This maybe because you have not specified the actual requirements.


SirJB7,

Again agree with what you have said, I will try to work on this once I get the above details.


Regards,

~VijaySharma
 
Hi Subroto ,


Check out the workbook at the following link :


https://docs.google.com/open?id=0B0KMpuzr3MTVUlU1ZWx5N2pHX3M


It is an elementary timer ; if it is something like what you are looking for , probably it can be extended.


Narayan
 
Hi All ,


Just came across this , and thought of sharing it :


http://datapigtechnologies.com/blog/index.php/new-date-formatting-trick-kind-of/


Narayan


P.S. Is it possible , we can have a sticky category , where anyone who comes across something interesting , can post the link ? I have seen that Dan opens a topic and posts his links , but if it is a sticky posting area , then it'll always be available , whereas Dan's post is now probably difficult to access if one did not know that it had to with visualization.
 
@vijaySharma

Hi!

My imagination remained short for start/pause/continue/stop timer emulation features.

Regards!


@NARAYANK991

Hi!

Not a bad idea, but should it be a free sticky topic or should it has certain kind of moderation? I feel inclined more to the second way, do you imagine what sort of "interesting" things we might encounter there if freely available?

Regards!
 
Back
Top