+ Reply to Thread
Results 1 to 7 of 7

Figuring out time logged in during specific times

  1. #1
    Registered User
    Join Date
    11-11-2011
    Location
    Maine, USA
    MS-Off Ver
    Excel 2010, Windows 7 or XP
    Posts
    16

    Figuring out time logged in during specific times

    I have the login/logout data (in the "Login" field in sample file. The actual file I am working on has ~4000 logins) and in the other tab ("ExtraTime") has the beginnings and ends of time periods which I need to compare against the login data.

    What I need is a way to figure out how much of the logged in time segment, if any, is part of the ExtraTime logins (I hope that makes sense). I realize this should be easy, but I can't quite figure this out.

    Any help would be super appreciated.
    Attached Files Attached Files
    Last edited by Andrew_Harris; 12-04-2012 at 07:51 PM.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Figuring out time logged in during specific times

    Hi Andrew,

    I started with using If / vlookup function and came up with below one

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    since it appears to be working, hence don't want to improve this though I know better formulas can be used here

    See attached: sample file.xlsx

    Used two columns, colored in orange, to support the calculation and avoid arrays

    regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    11-11-2011
    Location
    Maine, USA
    MS-Off Ver
    Excel 2010, Windows 7 or XP
    Posts
    16

    Re: Figuring out time logged in during specific times

    Thanks for the response. Unfortunately, it does not appear that this solution works due to there being multiple Extra Time time periods on some dates and some of the time periods span multiple dates.

  4. #4
    Registered User
    Join Date
    11-11-2011
    Location
    Maine, USA
    MS-Off Ver
    Excel 2010, Windows 7 or XP
    Posts
    16

    Re: Figuring out time logged in during specific times

    Anyone else have any ideas? I normally use array formulas to deal with multiple value lookups, but with over 4000 entries that really isnt going to work (as in, it crashed excel when I tried).

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Figuring out time logged in during specific times

    Try this "array formula" in E2

    =SUM(IF(ExtraTime!A$1:A$100>D2,"",IF(ExtraTime!B$1:B$100<C2,"",IF(ExtraTime!B$1:B$100>D2,D2,ExtraTime!B$1:B$100)-IF(ExtraTime!A$1:A$100<C2,C2,ExtraTime!A$1:A$100))))

    confirmed with CTRL+SHIFT+ENTER and copied down column, see attached
    Attached Files Attached Files
    Last edited by daddylonglegs; 12-04-2012 at 05:17 PM.
    Audere est facere

  6. #6
    Registered User
    Join Date
    11-11-2011
    Location
    Maine, USA
    MS-Off Ver
    Excel 2010, Windows 7 or XP
    Posts
    16

    Re: Figuring out time logged in during specific times

    That seems to work, thanks!

    Apparently I need to learn how to write my array functions better.

    Would anyone perhaps have a link to a good location for me to learn something beyond the basics of array formulas?

    Thanks
    Last edited by Andrew_Harris; 12-04-2012 at 07:56 PM.

  7. #7
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Figuring out time logged in during specific times

    Hi Andrew,

    See the below link from Microsoft :-

    http://office.microsoft.com/en-us/ex...010228458.aspx

    regards,
    DILIPandey

    <click on below 'star' if this helps>

+ 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