Consulting

Results 1 to 10 of 10

Thread: want to find max time & min time

  1. #1

    want to find max time & min time

    13:00:02
    16:09:04
    16:09:28
    16:29:25
    16:29:48
    19:10:33
    19:33:24
    20:06:54
    20:09:01
    22:04:32
    22:06:54
    0:16:43
    0:17:13
    0:30:14
    0:30:54
    0:52:26
    I have this list of times. I want to find max and min from this list. max should come 0:52:26 and min should come 13:00:02.

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    You will have to explain how max is 0:52:26 when there are times much later in the list.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Hi xld,

    Acutaly 0:52:26 is 12:52:26AM.

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    That is still much smaller than 13:00 whixch is 1 PM
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    VBAX Expert
    Joined
    Aug 2007
    Location
    Windermere, FL, a 'burb in the greater Orlando metro area.
    Posts
    567
    Location
    I have this list of times. I want to find max and min from this list. max should come 0:52:26 and min should come 13:00:02.
    Your values are the first and last ones in the list but are not the min and max of the list.

    Using the MIN() and MAX() functions on your range gives:
    MIN = 00:16:43
    MAX = 22:06:54

    Sorting the time entries in ascending order will help you see why these are the correct values.

    Ron

  6. #6
    Here I have attached one file. Which shows entry and exit times. I want to find the first entry and last exit on that day.

  7. #7
    VBAX Expert
    Joined
    Aug 2007
    Location
    Windermere, FL, a 'burb in the greater Orlando metro area.
    Posts
    567
    Location
    Amit,

    Please try the upload, again. The system seems to have thwarted you effort.

    Ron

  8. #8
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    It would have helped if you had mentioned the date and status criteria at the start!

    =MIN(IF(($A$2:$A$37=--"2007-12-04")*($B$2:$B$37="Entry"),$C$2:$C$37))

    =MAX(IF(($A$2:$A$37=--"2007-12-04")*($B$2:$B$37="Exit"),$C$2:$C$37))

    which is an array formula, it should be committed with Ctrl-Shift-Enter, not just Enter.Excel will automatically enclose the formula in braces (curly brackets), do not try to do this manually.When editing the formula, it must again be array-entered.Note that you cannot use a whole column in array formulae (prior to excel 2007), but must use an explicit range.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  9. #9
    Thank you very much xld

  10. #10
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,064
    Location
    and if the period is greater than 24 hours?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •