Obtaining the maximum time passing midnight

russthedutch

New Member
Joined
Jan 16, 2015
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have a spreadsheet which lists operative names and I have to find out each persons time of first task and time of last task. The data is extracted from a warehouse management system which does log each task start and end time.

I have used a min(if statement to look at each persons name and then find the minimum time in the list, but I'm struggling with the end time. the reverse max(if does not work because the operatives spread over midnight and therefore need to take the completed date into consideration (the dates and times are available in the raw data).

I think I need the formula to look at name, for each name display the maximum date found, and then for the name and date look for the maximum time found - but I can't get it to work.

This is the formula I am writing, where Name is in Col. A, last task date is H and finish time is F.

{=MAX(IF($A$2:$A$21=A2,AND($H$2:$H$21=H2,$F$2:$F$21=F2),F2))}

I've also tried index/match to look for the name then compare the last date/time and display the relevant time - but I can't get that to work either.

Can anyone assist please? You'd be responsible for resolving many sleepless nights if you could :)

Thanks,
Russ
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Why not instead of arbitrarily looking at "Finish Time" just perform a subtraction calculation on the Finish Time minus the Start Time?

The reason I write this is because I assume you can't have a Finish Time without a Start Time? Once you get the hours difference, you can always easily solve for when that specific Finish Time was exactly while also being able to compare and determine who stayed the longest or latest.
 
Upvote 0
Why not instead of arbitrarily looking at "Finish Time" just perform a subtraction calculation on the Finish Time minus the Start Time?

The reason I write this is because I assume you can't have a Finish Time without a Start Time? Once you get the hours difference, you can always easily solve for when that specific Finish Time was exactly while also being able to compare and determine who stayed the longest or latest.

I do have a start and end time. I don't want to work it out i want to display it.

Big list of names, each with lots of start and end times. I need to show each persons first and last task in a list.

Thanks
 
Upvote 0

Forum statistics

Threads
1,224,061
Messages
6,176,152
Members
452,707
Latest member
laplajewelry

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top