+ Reply to Thread
Results 1 to 5 of 5

Need To Track Time Spent Active In Workbook

  1. #1
    Registered User
    Join Date
    08-26-2013
    Location
    Portland
    MS-Off Ver
    Excel 2010
    Posts
    9

    Need To Track Time Spent Active In Workbook

    My team and I are attempting to track how much time we are spending in each Excel workbook we create (all workbooks are created from a single template). The problem is that we are often jumping back and forth between different workbooks throughout the day so manual entry methods are neither accurate or practical. Is there a way, with macros or formulas, to embed a time tracker in the template workbook that would only record active (when workbook is selected) time in the workbook?? Thanks

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Need To Track Time Spent Active In Workbook

    You could add a LOG sheet, hidden in your workbook. Then in the ThisWorkbook code module of that workbook you could use these EVENT macros... one to write time the timestamp when the workbook took focus (you started working on it), and another to timestamp when the workbook loses focus.

    Please Login or Register  to view this content.

    Be sure to Format column C of these LOG sheets as [h]:mm:ss
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    08-26-2013
    Location
    Portland
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Need To Track Time Spent Active In Workbook

    Hey, this is exactly what I am looking for! However I am having some trouble implementing it. Should it be as easy as adding a 'Log' sheet and pasting this code into the ThisWorkbook module? When I do this I get a timestamp added to column A only when I close then reopen the workbook. Thanks for your help

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Need To Track Time Spent Active In Workbook

    You probably need to add this third macro in, so when the workbook is closed it saves an out stamp, too:


    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-15-2014
    Location
    Kiev
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Need To Track Time Spent Active In Workbook

    This is great! Would be great if you could help to improve few things:
    1. When you swich to any other app, for example internet explorer this should meen that the workbook is deactivated. Now it looks like that the book is deactivated only when you close excel or swich to other workbook
    2. How to add user name to the logg, as several users can work with the same file, and it would be great to know how much time each user has spent
    3. How to make this macro add: log of file name, user name, time spent to the file save on network, so it would collect all info from all users to the one file stored on network?
    Thank you!

+ 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. Macro to track time spent on an activity
    By amark in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-03-2014, 06:19 AM
  2. Replies: 6
    Last Post: 10-19-2012, 12:12 PM
  3. Time Tracker - I need a macro that calculates the time spent on an activity
    By amark in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-01-2011, 09:55 AM
  4. can I Track time spent in doing a test in Excel sheet
    By san83 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-04-2009, 05:23 AM
  5. Replies: 1
    Last Post: 12-16-2006, 04:23 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