+ Reply to Thread
Results 1 to 10 of 10

Login - Logout report

  1. #1
    Registered User
    Join Date
    11-07-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    81

    Login - Logout report

    Attached is the login-logout report for my team . Which gives me employee login time & logoff time . The dump has few entries which are repeated . For ex : In Cell D5 employee logged in , E5 has a logout time ( which is incorrect ) , while cell D6 has a login time ( which is incorrect ) , E6 has a logout time which is correct . So for 4th Dec I wanted to have D5 ( for login ) - E6 ( for logout ) . In the same way , I have many cells which has been repeated .


    Hint - (1) Days shouldn't not be repeated . (2) Logout time shuld be greater than the login time for that day ( & rest should be eliminated for that day )


    I'm not sure if I have explained it clearly or not. Do let me know if I can provide any other information .
    Attached Files Attached Files
    Last edited by vamshi57; 12-12-2009 at 02:15 PM.

  2. #2
    Forum Contributor
    Join Date
    12-02-2009
    Location
    Akron, Ohio
    MS-Off Ver
    Excel 2010
    Posts
    208

    Re: Login - Logout report

    We would need to know what the employee is logging into and off of. Also, what is producing the dump? Where is the code?

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Login - Logout report

    Why not just push the data into a Pivot ?

    Row Fields:
    -- Name
    -- Date

    Data Fields:
    -- Login Time set to MIN
    -- Logout Time set to MAX
    set number format of the above to h:mm:ss
    This will give you per employee one record per day with their respective IN/OUT times
    (above assumes shifts don't cross midnight)

  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: Login - Logout report

    This should take care of it for you:
    Please Login or Register  to view this content.
    ===========
    How/Where to install the macro:

    1. Open up your workbook
    2. Get into VB Editor (Press Alt+F11)
    3. Insert a new module (Insert > Module)
    4. Copy and Paste in your code (given above)
    5. Get out of VBA (Press Alt+Q)
    6. Save your sheet

    The macro is installed and ready to use. Press Alt-F8 and select LogInOutMerge from the macro list.

    Try this on a copy of your data.
    _________________
    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!)

  5. #5
    Registered User
    Join Date
    11-07-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: Login - Logout report

    Awesome ... Macro is too good .. It exactly gave me the results I needed . Thanks much

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

    Re: Login - Logout report

    If that takes care of your need, be sure to EDIT your original post, click Go Advanced and mark the PREFIX box [SOLVED].


    (Also, use the blue "scales" icon in our posts to leave Reputation Feedback, it is appreciated)

  7. #7
    Registered User
    Join Date
    11-07-2009
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    81

    Re: Login - Logout report

    I previous sheet I have attached is modified by me to make my explanation easier . Can you modify the macro to adjust the below format . Infact I get the dump in the attached format .

    Quick question - Is there any way this can be done by formulaes or through pivots ,,,, just in case . as it would be easier - irrespective of what format I have the data in . If not no issues , I'm still okay with macro .
    Attached Files Attached Files

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

    Re: Login - Logout report

    This will work on the shown layout, and it will adjust the columns to display the times for you:
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    04-18-2016
    Location
    hyd
    MS-Off Ver
    7
    Posts
    1

    Re: Login - Logout report

    Can any help regarding
    Excel sheet has 3 columns A has login and logout time and B has name of employee and C has date. Here i wanted to copy first login of the employee and last logout of the employee on the day to another sheet in the same excel.
    Here employee can login and logout more then once. For example if employee login 3 times and 3 times logged out then we will have three records in the day from that we need to copy the first login and last logout time to another sheet.

    I hope i explained good. Please provide me macro for this as i am beginner for macro in could not able to write.

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: Login - Logout report

    mskumar507 welcome to the forum

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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