Forum Discussion
VladLockhart
Jul 15, 2024Copper Contributor
Calculate total working hours between date/time excluding weekends and break time
Hello, I want to calculate the hours between two fields, but I just want a simple number of hours. No concatenated labels, not days, just accumulated hours and I need it to exclude weekends and...
- Jul 15, 2024
I attached the wrong version, sorry.
The 2 hours in the first example is because the 1st of May is in the holiday list. If you remove that date from the holiday list, you get 3 hours.
See the attached version.
VladLockhart
Copper Contributor
Hi thanks for replying, i tried to change the input but it shows error #NAME?.
PeterBartholomew1
Jul 17, 2024Silver Contributor
There aren't many defined names so entering
= timeline
= start
= end
= holidays
should reveal which one is missing, though 'holidays' could be dropped from the formula. Alternatively, the function HoursWorkedλ is itself a defined name and could be missing if you are using another workbook. Copying cell D4 and pasting it to the other workbook should bring the function across, The function is written using English localisation, which could cause problems if they are not translated properly.