Quote Originally Posted by Bob Phillips View Post
That's about what I thought, so try this as the time out formula

=INDEX(MOD('Data exported from acces sistem'!$I$2:$I$20,1),
MATCH(1,('Data exported from acces sistem'!$G$2:$G$20=$A3)
*((INT('Data exported from acces sistem'!$I$2:$I$20)=$B$1)+(INT('Data exported from acces sistem'!$I$2:$I$20)=$B$1+1)),0))

(I see you already cater for the midnight overlap in your totals formula).
Yes I solved the total formula !

The formula works but now is a new problem ?

IF a person hadn't worked in 24/07/2011 but on 23/07/2011 and 25/07/2011 the IN formula (in formula infigureted by me for night shift) brings the IN time from 23/07/2011 and the out formula brings the OUT time for 25/07/2011 and the worker will have and IN and OUT time for a day in wich he did not worked.