Hi all,
I need to show the time passed between the last shift. A person that works on shifts, should have at least 11 hours between the shifts.
I get the data in a sheet with all the people. Some work in shifts, others not. The ones that work on shift, the system puts out excel file and those shift workers appear in 2 rows instead of 1.
currently, we use the below formula, but we put this by hand and only on those that are in 2 rows of the excel file. I'm not able to fill it down as it would give is wrong times
=IF(A5="","",IF(A5=A4,IF(NETWORKDAYS(E4,E5)=2,B5-C4,""),""))
this is an example how it looks like:
[TABLE="width: 489"]
[tr]
[td]
John Flonder
[/td]
[td]
17/10/2016 08:35:33
[/td]
[td]
17/10/2016 16:01:29
[/td]
[td][/td]
[/tr]
[tr]
[td]
Sandra Romolek
[/td]
[td]
17/10/2016 09:57:25
[/td]
[td]
17/10/2016 18:03:44
[/td]
[TD="align: right"]16:35:53
[/TD]
[/tr]
[tr]
[td]
Sandra Romolek
[/td]
[td]
18/10/2016 10:39:37
[/td]
[td]
18/10/2016 18:04:26
[/td]
[td][/td]
[/tr]
[tr]
[td]
Peter Flonder
[/td]
[td]
17/10/2016 08:35:33
[/td]
[td]
17/10/2016 16:01:29
[/td]
[td][/td]
[/tr]
[/TABLE]
As you can see, Sandra time between shifts was 16:35:53
Can this be done using VBA and then put the diference time in the G column?
(then name is in column A and the other fields in B and C)
It should be compatible with excel 2003 too
Greetings.