+ Reply to Thread
Results 1 to 8 of 8

Creating a Stopwatch in Excel.

Hybrid View

Learning_XL Creating a Stopwatch in Excel. 08-25-2011, 01:42 PM
royUK Re: Creating a Stopwatch in... 08-25-2011, 02:28 PM
Whizbang Re: Creating a Stopwatch in... 08-25-2011, 03:30 PM
Learning_XL Re: Creating a Stopwatch in... 08-29-2011, 06:47 AM
Whizbang Re: Creating a Stopwatch in... 08-29-2011, 08:23 AM
Learning_XL Re: Creating a Stopwatch in... 08-29-2011, 08:31 AM
Whizbang Re: Creating a Stopwatch in... 08-29-2011, 09:35 AM
Learning_XL Re: Creating a Stopwatch in... 09-05-2011, 10:18 AM
  1. #1
    Registered User
    Join Date
    08-25-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    4

    Creating a Stopwatch in Excel.

    Hi,

    I am new to the forum and this is my first post so hi to everybody.

    Right to the matter in hand now. I would like help with creating a code to insert a stopwatch/timer into excel.

    What I would like it for is so that I can log events in soccer matches that I watch on TV. I have already created simple macros to log a particular event at a certain time but the cell that I use for the time is currently me just clicking each minute up manually.

    What I think would be idea to have a code that I could start when the match kicks off it counts up to 45 mins for HT and then stops. Then something for the second half where it starts at 45 mins and then counts up to 90 for the end of the match and then ends.

    I have looked endlessly online and through forums for something similar but cannot quite find what I am looking for, so I am hoping that some kind person here could help.

    Whilst the clock is ticking the spreadsheet will be making some simple calculations which I hope wont cause an issue.

    Any help will be greatly recieved.

    Many thanks,

    Learning_XL

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Creating a Stopwatch in Excel.

    See Andy Pope's clocks
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: Creating a Stopwatch in Excel.

    Please take a look at the attached. Is this approximately what you want?
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    08-25-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Creating a Stopwatch in Excel.

    Thanks Whizbang this is exactly what I am looking for.

    Sorry for the naiveity but do I just copy the codes from the VBA and paste them into the workbook that I want them for?


    Quote Originally Posted by Whizbang View Post
    Please take a look at the attached. Is this approximately what you want?

  5. #5
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: Creating a Stopwatch in Excel.

    You would have to create named ranges as well to match those used in the code (eg "StartTime", "RunningTime", "EndTime", StartTime2", etc.)

  6. #6
    Registered User
    Join Date
    08-25-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Creating a Stopwatch in Excel.

    Excellent, I can do that.

    Just for reference, can I change the range in the code to a specific cell rather then create name ranges?

    I will look at this and have a go at it later and let you know how I get on.

    Many Thanks.

    Quote Originally Posted by Whizbang View Post
    You would have to create named ranges as well to match those used in the code (eg "StartTime", "RunningTime", "EndTime", StartTime2", etc.)

  7. #7
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: Creating a Stopwatch in Excel.

    Yes. This will work just fine.
    Range("A1")

    Hard coding like this means you'll have to update your code every time you change the layout of your worksheet. Also, by using named ranges, it make your code almost self-documenting (and therefore easier to read). But, it is up to you.

  8. #8
    Registered User
    Join Date
    08-25-2011
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Creating a Stopwatch in Excel.

    Thanks for this it is great.

    I have it used for what I need it for.

    There is just one slight problem, when the clock is running if I input data into a cell or change a value that is already there the clock/timer stops. Is there anyway around this?

    Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1