mercredi 5 juillet 2017

excel - timesheet if day before and day after holiday worked

enter image description here I currently have if the holiday add 8 hours with the following formula.

=IF(SUMPRODUCT((LEFT(TEXT(B5,"mmm"),3)=LEFT(Holidays!$B$2:$B$11,3))*(DAY(B5)=--RIGHT(Holidays!$B$2:$B$11,2))),8,0)

I think what I'm asking for would go where the 8 currently is.

So what I am attempting to do is only add those 8 hours if the scheduled working day before the holiday, and the scheduled working day after the holiday is worked. Now I know this wont put the +8 hours in until the information for the following day is entered but that is fine as long as the week end totals include the holiday.

Is there any way I can go about achieving this?

Aucun commentaire:

Enregistrer un commentaire