+ Reply to Thread
Results 1 to 17 of 17

Min / Max Time with multiple rows

  1. #1
    Registered User
    Join Date
    12-07-2018
    Location
    Philadelphia, PA
    MS-Off Ver
    2007
    Posts
    12

    Question Min / Max Time with multiple rows

    Good morning all,

    I am new here and pretty good with excel but having a roadblock on one of the Dashboards I am creating.

    I have a list of people with multiple rows that have times in them. I need to be able to capture JUST the earliest time and the latest time for each person.


    See below. Bill Smith has several rows for one day. He logged into the system at 9:00 (I need to capture that) And then logged out and back in a few times this day. His last log out was at 17:04. I need to capture that as well.



    Capture.PNG

  2. #2
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Min / Max Time with multiple rows

    Attach a sample file with some data.
    I think you should be able to use Min and Max formulas.
    1. Click on the * Add Reputation if you think this helped you
    2. Mark your thread as SOLVED when question is resolved

    Modytrane

  3. #3
    Registered User
    Join Date
    12-07-2018
    Location
    Philadelphia, PA
    MS-Off Ver
    2007
    Posts
    12

    Re: Min / Max Time with multiple rows

    Hmm, when I click on attachments it does't open up any type of options to choose a file. Just a small thin box.

    Capture.PNG

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Min / Max Time with multiple rows

    It would help if you attached a sample Excel workbook.

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post. Don't try to use the Paperclip icon (Attachments button), as it doesn't work on this forum.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    12-07-2018
    Location
    Philadelphia, PA
    MS-Off Ver
    2007
    Posts
    12

    Re: Min / Max Time with multiple rows

    Thank you so much Pete!

    Attached is the sample file.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Min / Max Time with multiple rows

    See attached file.

    Formula used to capture log-in:
    =MIN(C2:C13)

    For Log out:
    =MAX(D2:D13)

    For total time from log-in to log-out is diff.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    12-07-2018
    Location
    Philadelphia, PA
    MS-Off Ver
    2007
    Posts
    12

    Re: Min / Max Time with multiple rows

    Thanks modytrane.
    I should have specified that there are multiple employees and dates on the spreadsheet So I imagine using some sort of sumifs, index, or something along those lines along with the min arguemnt for log in and then a separate formula with the max argument for log out
    I would be looking up
    If employee name (Bill Smith)
    If this date (12/6/2018)
    Give me the minimum of the log in times in column C

  8. #8
    Registered User
    Join Date
    12-07-2018
    Location
    Philadelphia, PA
    MS-Off Ver
    2007
    Posts
    12

    Re: Min / Max Time with multiple rows

    Here is a better example of the data file I would be working with. My apologies for the earlier incomplete one.
    Attached Files Attached Files
    Last edited by PeterMcAteer; 12-07-2018 at 02:57 PM.

  9. #9
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Min / Max Time with multiple rows

    maybe using these 2 array formulae
    =MIN(IF((B2:B49=K1)*(INT(C2:C49)=K2),C2:C49))
    =MAX(IF((B2:B49=K1)*(INT(D2:D49)=K2),D2:D49))
    Like
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    12-07-2018
    Location
    Philadelphia, PA
    MS-Off Ver
    2007
    Posts
    12

    Re: Min / Max Time with multiple rows

    Thanks Fluff13!
    I think that may do the trick. I will play with that and let you know if there are any issues.

  11. #11
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Min / Max Time with multiple rows

    You're welcome & thanks for the feedback.

  12. #12
    Registered User
    Join Date
    12-07-2018
    Location
    Philadelphia, PA
    MS-Off Ver
    2007
    Posts
    12

    Re: Min / Max Time with multiple rows

    Hi all,

    So it looks like the above formula is not working. It is still pulling the overall earliest (minimum) time.
    See column L an M for formula. It is pulling the overall earliest time in the entire sheet for Bill. Same for log out time.
    For Tony is is giving generic 12:00am for both.
    Attached Files Attached Files

  13. #13
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Min / Max Time with multiple rows

    Those are array formulae & need to be confirmed with Ctrl Shift Enter not just Enter.
    If done correctly excel will wrap the formula in {}

  14. #14
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Min / Max Time with multiple rows

    Those are array formulae, which means that you have to commit them using the key combination of Ctrl-Shift-Enter (CSE), instead of the usual Enter.

    Select cell L2 and click in the formula bar as if to edit the formula, then hold down the Shift and Ctrl keys and press Enter. You should see curly brackets { and } around the formula in the formula bar if you have done this correctly. Do the same with cell M2, and then you can copy those formulae down as far as you need to.

    Hope this helps.

    Pete

  15. #15
    Registered User
    Join Date
    12-07-2018
    Location
    Philadelphia, PA
    MS-Off Ver
    2007
    Posts
    12

    Re: Min / Max Time with multiple rows

    Excellent. Thanks Pete and Fluff.

    I haven't used array formula's before. One question - Does the formula need "start" and "stop" parameters or can it be more generic?
    Like instead of B2:B50 could it be B:B

  16. #16
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Min / Max Time with multiple rows

    It is not a good idea to use full-column references with an array formula, as every cell in the range will be examined (i.e. 1 million plus of them). You can, of course, use ranges which are larger than you expect to use, e.g. B2:B5000, C2:C5000 etc., but all ranges must be the same size. You need to use CSE again to commit the formula if you edit it.

    Hope this helps.

    Pete

    P.S. If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark this thread as SOLVED.

    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

  17. #17
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,078

    Re: Min / Max Time with multiple rows

    Glad we could help & thanks for the feedback

+ 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. Increasing value by 1 for multiple rows at a time
    By helpmekid in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-17-2014, 09:13 PM
  2. Splitting rows with multiple columns into seperate rows for time points.
    By mbracha in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-16-2013, 10:06 AM
  3. Clock In/Out - Macro to Log Time by a Switch on multiple columns (multiple rows)
    By jasw529 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-30-2013, 06:45 AM
  4. Scroll Multiple Rows/Columns at a Time
    By rowish in forum Excel General
    Replies: 3
    Last Post: 03-18-2013, 05:05 PM
  5. Extract multiple date and time values to multiple rows
    By WilliamV in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 11-04-2012, 08:02 AM
  6. Summing Multiple rows at a time in column
    By michaelj2005 in forum Excel General
    Replies: 1
    Last Post: 05-19-2010, 01:46 PM
  7. Moving Multiple Rows at one time
    By Lynda M in forum Excel General
    Replies: 2
    Last Post: 10-03-2005, 05:05 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