[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1647
  • Last Modified:

Excel 2010: Macro Button Stop Watch

Curious if someone has a stop watch macro that I can use.  I'd like to track how much time worked on each event on my spreadsheet.  If I had a macro button I could embed on each row, I could click on each button in each row to do this.  I could click on this button before I begin, then click on the button when finished.  It would then populate the total time worked in column L of my spreadsheet in each cell.  If it could compute a running total of timed worked that would be awesome too.  Thank you for your help.
0
itsmevic
Asked:
itsmevic
  • 4
  • 3
1 Solution
 
itsmevicAuthor Commented:
i think i found a macro that works just need to enter proper syntax for entire L column range.  Any help is appreciated.  Thanks.

Private Sub TickTock()
Range ("L2").Value = Format (Time - t, "hh:mm:ss")
NextTick = Now + TimeValue ("00:00:01")
Application.OnTime NextTick, "TickTock"
End Sub
0
 
Saqib Husain, SyedEngineerCommented:
What do you mean by entire L column? Can you give an example?
0
 
itsmevicAuthor Commented:
Here is a screenshot of the spreadsheet and button set-up.  Hopefully this will help.
20130617-174458515382038.jpg
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
Saqib Husain, SyedEngineerCommented:
Can  you consider having one set of buttons and select the desired cell? In this case your macro could be

Private Sub TickTock()
selection.Value = Format (Time - t, "hh:mm:ss")
NextTick = Now + TimeValue ("00:00:01")
Application.OnTime NextTick, "TickTock"
End Sub
0
 
Saqib Husain, SyedEngineerCommented:
Please upload your excel file so that we can continue from there. Fake the values if needed.
0
 
itsmevicAuthor Commented:
the module you provided was nice, however it doesnt track total time.  i.e. It doesnt start from 00:00:01 and count up.  Being able to click on the cell to start and stop is nice, the only problem with the current module is that it doesnt matter where you click on the worksheet it will embed a clock and not a timer.  I need a timer that can be stopped and started via a button or buttons (start and stop button) or stopped and started with a double-click and limit to one columns entire range if need be.  Hope that makes sense.
0
 
itsmevicAuthor Commented:
Here is a sample file...
Example.xlsx
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now