+ Reply to Thread
Results 1 to 8 of 8

Duration: login logout macro

  1. #1
    Registered User
    Join Date
    11-17-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    70

    Duration: login logout macro

    Hi All,

    I really need help with regards to this. I need to get the duration of every time a person logs out and logs in again. I tried using formulas but the instances is i always have to do it manually because a person can log out 2 or more times. every day is a different scenario (a person who logged out 2 on a day can log out 4x in the next day).

    I apologize if i can't explain it properly, but maybe if you guys can see the file you can understand it more clearly.


    Please help me on this. . ..


    attached file is a sample data: sample data.xlsx

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Duration: login logout macro

    Hello city,

    I made a few changes to your workbook. Sheet2 is now used to compute the total time for each agent.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    11-17-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    70

    Re: Duration: login logout macro

    Hi Leith Ross,

    Thank you for response but. What I was looking for is something that will actually compute automatically for the 2nd login time of a person and the 1st logout.

    Sheet 1
    Column A:G are changeable. Output needed is the one in Column I.

    Sheet 2
    is the view of what exactly I am trying to accomplish.

    I really think a macro can do this. If it is formula driven i think it would still be done manually.

    See attached file.

    (Duration.xls

  4. #4
    Registered User
    Join Date
    11-17-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    70

    Re: Duration: login logout macro

    no response.. . . . .

  5. #5
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Duration: login logout macro

    Based on the indata in sheet1 from Leiht Ross I've added a macro that could be what you are looking for.

    To test it run macro "Create_log"

    Alf
    Attached Files Attached Files

  6. #6
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Duration: login logout macro

    Hi city

    Thanks for the very positive feedback from you. Problem solving is always fun and if one's efforts are of value to somebody and feedback given it makes it much more pleasant.

    Could I ask for another favor? As your problem now seems to be solved could please mark your thread “Solved”.

    Regards

    Alf

  7. #7
    Registered User
    Join Date
    11-17-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2010
    Posts
    70

    Re: Duration: login logout macro

    Hi Alf,

    I would like to tag the thread as "Solved" but I can't seem to find the edit post in the 1st post to mark it as solved..

  8. #8
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Duration: login logout macro

    Hi city

    If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.
    I think you probably need to PM a moderator and ask to get your post marked.

    Alf

+ 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