+ Reply to Thread
Results 1 to 6 of 6

measuring 2 ALTERNATING activities - 2 stopwatch switched (paused / unpaused) by 1 button

  1. #1
    Registered User
    Join Date
    08-17-2013
    Location
    Prague
    MS-Off Ver
    Excel 2003
    Posts
    20

    measuring 2 ALTERNATING activities - 2 stopwatch switched (paused / unpaused) by 1 button

    I need to program custom stopwatch (HH:MM:SS) in excel. There are simple stopwatch examples on the Internet (using VBA) but I do not know how to edit them to acomplish what i need. If someone could solve this for me so it can run on PC and Mac (compatible VBA, xlsm) id be forever gratefull. Any Excel Pro who would take on the challenge. Thanks

    Ive got 2 activities. Activity A (e.g. squating) and Activity B (e.g. resting).

    Ive got a trainee who switches between Activity A and Activity B when the trainer in the room shouts "NOW"

    The trainer randomly shouts "NOW" and the trainee switches between Activity A and Activity B everytime he/she hears a command.

    After some time, an unspecified time (e.g. half-hour) its over, and I need to know how much time a person spent in Activity A and how much time he spent in Activity B.

    So it's a stopwatch that SWITCHES between two counters at a press of a button.

    SEE THE ATTACHED PICTURE FOR ILLUSTRATION:

    1) Press START - TIME A starts from zero and runs and runs and runs
    2) Press SWITCH - TIME A pauses and TIME B starts from zero and runs and runs and runs
    3) Press SWITCH - TIME B pauses and TIME A continues from where it was left

    and so on, all the time - Pressing SWITCH does not zero/reset the counters, it only PAUSES currently running counter and UNPAUSE the other counter

    Alternating many times between activities, the counters keep adding and at the end (for example after 30 minutes) i see that trainee spent 18:22 in Activity A and 11:38 in Activity B. During those 30 minutes the trainer shouted "NOW" 50 times, so did i press SWITCH 50 times.

    The HOLD pauses the currently running counter without starting the other counter, the CONTINUE unpauses the last active counter
    The RESET button resets both counters to zero
    The START key always starts TIME A (START button is only used at begining of measurement after RESET)

    THANKS

    https://www.excelforum.com/attachmen...1&d=1504736517


    Attached is a ILLUSTARTIVE OUTLINE jpg
    Attached Images Attached Images
    Last edited by macropulos; 09-07-2017 at 01:56 AM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,663

    Re: HELP i need custom stopwatch in EXCEL (iam a newbie)

    Want to get your question answered quickly?
    • Ensure your question is not too vague. Don't assume anyone is familiar with your problem. While you can upload small attachments, describe your problem in the body of the post. We are fortunate to have several Excel gurus, but few mind-readers.
    • On the other hand, skip irrelevant details. Be descriptive and concise. Short, direct, and to-the-point questions with apt thread titles are almost always answered promptly.
    • Keep the scope reasonably narrow. Questions like, "How do I set up an accounting system in Excel?" might be a long time waiting.
    • Explain what you've already tried. ("Calculation is set to automatic, but formulas still don't compute") so helpers don't waste your time or theirs.
    • Post a WORKBOOK. Nobody wants to type data from a picture or paste text from your post into a spreadsheet as a prelude to helping. To attach a file, push the button with the paperclip (or scroll down to the Manage Attachments button), browse to the required file, and then push the Upload button.
    • If your question has not been answered within a day, consider adding another post with any additional information you believe is relevant. If you think your post is good as is, just reply to your own thread with the words "Bump no response", which will bring it to the top of the forum.



    Go to the Commercial Services section of this site http://www.excelforum.com/commercial-services/
    And read the FAQ on how to solicit paid help.
    Last edited by protonLeah; 09-07-2017 at 03:03 PM.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    08-17-2013
    Location
    Prague
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: measuring 2 ALTERNATING activities - 2 stopwatch switched (paused / unpaused) by 1 but

    Nevermind i was able to ask a collegue to program it. Issue Solved.

    If anyone is interesetd to get the macro PM me.
    Last edited by macropulos; 09-08-2017 at 11:23 AM.

  4. #4
    Valued Forum Contributor Maudibe's Avatar
    Join Date
    12-21-2016
    Location
    USA
    MS-Off Ver
    2010-2013
    Posts
    326

    Re: measuring 2 ALTERNATING activities - 2 stopwatch switched (paused / unpaused) by 1 but

    macropulos,

    I have been working on this for a couple of days but did not refer back to your post to see that you have had your issue solved. I will post anyway.

    A sheet button will launch the StopWatch form. The buttons are arrange in the fashion of the image you posted. As buttons are selected, subsequent available actions are enabled while others are disabled.

    Example: After pressing the Start button, the Start, Continue, and Reset buttons are disabled because they are not an appropriate subsequent action while the Hold and Switch buttons are enabled (green).

    Timers are initiated by selecting specific buttons and are accurate. For each button selected, totals are sent to a log sheet where the the timers are recorded and tabulated. See the image below

    Stopwatch.png

    I hope you have a chance to review this,
    Maud

    Stopwatch.xlsm

  5. #5
    Registered User
    Join Date
    08-17-2013
    Location
    Prague
    MS-Off Ver
    Excel 2003
    Posts
    20

    Re: measuring 2 ALTERNATING activities - 2 stopwatch switched (paused / unpaused) by 1 but

    Hi, unfortunately only the brown table shows up when i open the file, the interface with green buttons on right is nowehere to be seen in my excel...
    Iam sorry you spent time on it, i didnt expect this collegue to be so quick with the solution. Karma goes to you Maudibe for helping out. Thanks and maybe next time.

    Iam posting the script from colegue so anyone can use it...
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor Maudibe's Avatar
    Join Date
    12-21-2016
    Location
    USA
    MS-Off Ver
    2010-2013
    Posts
    326

    Re: measuring 2 ALTERNATING activities - 2 stopwatch switched (paused / unpaused) by 1 but

    macropulos,

    The image shows the Stopwatch form opened achieved by clicking on the StopWatch button. Reset button will clear the table.

    Maud

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Excel stopwatch
    By buwa84 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-17-2015, 11:12 AM
  2. Excel Stopwatch Help [VBA]
    By lilhugo in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-05-2013, 10:27 AM
  3. Excel Stopwatch
    By daddy_smo in forum Excel General
    Replies: 2
    Last Post: 07-26-2011, 02:22 PM
  4. [SOLVED] Excel StopWatch
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-16-2006, 08:05 AM
  5. Newbie Help for Custom Number Formats
    By joshb416 in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 11-17-2005, 11:35 PM
  6. [SOLVED] Is it possible to place a stopwatch in Excel
    By Bob Phillips in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 07:05 PM

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