Oh I am sorry for the lack of information.
Actually the problem is coming from this formula only
AND(TEXT(L$1;"dddd")="Jumat";VLOOKUP($A3;Schedule!$1:84;4*(COLUMN(Schedule!O4)-COLUMN(Schedule!$I4))+3;0)="out";OR(AND(VLOOKUP($A3;Schedule!$1:84;4*(COLUMN(Schedule!N4)-COLUMN(Schedule!$H4))+2;0)=5;VLOOKUP($A3;Schedule!$1:84;4*(COLUMN(Schedule!L4)-COLUMN(Schedule!$F4));0)=VLOOKUP(VLOOKUP($A3;Schedule!$1:84;4*(COLUMN(Schedule!L4)-COLUMN(Schedule!$F4));0);'In Out'!$A$32:$B$38;2;0));AND(VLOOKUP($A3;Schedule!$1:84;4*(COLUMN(Schedule!N4)-COLUMN(Schedule!$H4))+2;0)=7;VLOOKUP($A3;Schedule!$1:84;4*(COLUMN(Schedule!L4)-COLUMN(Schedule!$F4));0)=VLOOKUP(VLOOKUP($A3;Schedule!$1:84;4*(COLUMN(Schedule!L4)-COLUMN(Schedule!$F4));0);'In Out'!$A$18:$B$31;2;0));AND(VLOOKUP($A3;Schedule!$1:84;4*(COLUMN(Schedule!N4)-COLUMN(Schedule!$H4))+2;0)=8;VLOOKUP($A3;Schedule!$1:84;4*(COLUMN(Schedule!L4)-COLUMN(Schedule!$F4));0)=VLOOKUP(VLOOKUP($A3;Schedule!$1:84;4*(COLUMN(Schedule!L4)-COLUMN(Schedule!$F4));0);'In Out'!$A$3:$B$17;2;0))));TEXT(VLOOKUP(VLOOKUP($A3;Schedule!$1:84;4*(COLUMN(Schedule!N4)-COLUMN(Schedule!$H4))+2;0);Friday!$A$2:$B$5;2;0);"h:mm")
I am trying to calculate working hours spent by the employees, exclude overtime work. The working schedule sheet shows entry (column In) and leave time (column Out), sometimes it also includes overtime work carried out by the employees. That is why I also need to check the OT column to see whether they have overtime work at the beginning of their shift (column OT=out) or at the end of their shift (column OT=in).
On Friday, if the employee comes or leaves for work at certain times (indicated on sheet "In Out"), the working hours spent will be added for another 30 minutes (sheet Friday). For example, this formula should return with 08:30 value.
I have put all of the logic that I want to test, but the value returning keep shows #N/A, especially on Friday.
Could you please tell me where the problem is?
Thank you