+ Reply to Thread
Results 1 to 3 of 3

Calculating time logged in

  1. #1
    Registered User
    Join Date
    04-22-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    24

    Calculating time logged in

    Hi,

    I am trying to display the time spent logged in to Sheet1 using a login script
    The login time is entered into cell (A1) and the logout time entered into cell (B1)
    Using =NOW() copied from another cell.

    the time is then calculated in cell (C1) however I would like to keep an ongoing record of the time logged in, so each time the user logs in the time is added to the previous time instead of overwriting it. I have tried the following with no luck, as a circular reference error occurs

    Please Login or Register  to view this content.
    is there a VBA code for this?

    thanks for any help on this

    Regards

    Steven

  2. #2
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    Re: Calculating time logged in

    A few possibilities

    1)
    Use Column a for all login times
    Use Column B for all logout time
    Use Column C for the elapsed time as Sumarize at the bottum

    2)
    Use Manual calculation so you can use circular references.
    lok here http://www.excelforum.com/excel-gene...lectively.html

    3) Use a Userform to enter your data
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

  3. #3
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Calculating time logged in

    Maybe something like this on the ThisWorkbook page of your workbook's VBA project:

    Please Login or Register  to view this content.

    The relevant code will kick off when the workbook is opened and closed.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

+ 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