Formula question - End date falls on the weekend but start date on weekday

Li_zzza

New Member
Joined
Oct 3, 2017
Messages
13
Hi everyone,


I'm currently working on a project and need to calculate the working hours between two dates. The project working hours are usually M-F, however, sometimes the dates fall on the weekend. The Networkdays.intl formula works perfectly when the start date and end date for weekdays. But for end dates or start dates on the weekend, it gives me a bunch of pound signs.

How do I make it that if the end date ends on the weekend, to only include working hours? For example, start date is Friday, 13.4.17 at 13:00 and end date is Saturday, 14.4.17 at 11:00. So the total working hours is 11 hours not 22 hours.

Current formula is Networkdays.intl(Start date, end date,,Holidays)-1-Mod(Start date,1)+Mod(end date, 1)
View format is [h];mm;@

Thanks
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Hello Li_zzza, welcome to MrExcel

You can use this formula to only give weekday hours

=NETWORKDAYS(StartDate,EndDate,Holidays)+NETWORKDAYS(EndDate,EndDate,Holidays)*(MOD(EndDate,1)-1)-NETWORKDAYS(StartDate,StartDate,Holidays)*MOD(StartDate,1)
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top