This formula works perfectly, and I thank you for your time and effort.
Ultimately I realized that the calculation was still not giving me the desired result, so I came up with another formula:
in E17 of 'Calcolo Giornaliero':
This calculates the earliest time of the day's first event and the latest of the day's last event. In the example of the 10th of March, in the first screenshot of the thread, that would be from 09:30 to 20:00. Then the formula subtracts the time from 12:30 to 14:00, so my client will add another event to the calendar called 'pausa', and the formula finds that event and subtracts the duration of it from the total hours.
It will then be:
and that's exactly the amount of hours he works in the day
What I am struggling with now is adapting this formula to sum the total hours for the month in D4 of the 'Calcolo Mensile' sheet. I was hoping you could help. For some reason, I cannot attach images or the .xls file to this reply, so I will put screenshots for a clearer explanation and the updated file in a folder in my OneDrive.
That you find here:
https://1drv.ms/f/s!AnzCEK8poKX0ioQJ...SeUMQ?e=JYHwsa
Thanks again for your help
Bookmarks