Oct 25 2023 12:04 AM
I'm trying to count the difference between 2 days, but excluded weekends
I try with function networkdays but it always count the starting date. When I add -1 to the function, it start to count the progress from the same day is -1
any better function to do it?
Oct 25 2023 01:24 AM
Hi @Gumzz212,
To calculate the difference between two dates, excluding weekends and excluding the starting date, in Excel using the NETWORKDAYS function, you can use the following formula:
=NETWORKDAYS(start_date + 2, end_date)
Where:
This formula will add two days to the start date before calculating the number of workdays between the two dates. This will effectively exclude the starting date from the calculation and exclude the weekend that the starting date may fall on.
For example, if you want to calculate the difference between 2023-10-23 and 2023-10-28, excluding weekends and excluding the starting date, you would use the following formula:
=NETWORKDAYS("2023-10-23" + 2, "2023-10-28")
This formula would return the value 4, which is the number of business days between the two dates, excluding the starting date and the weekend that the starting date falls on.
Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.
If the post was useful in other ways, please consider giving it Like.
Kindest regards,
Leon Pavesic
(LinkedIn)
Oct 25 2023 02:16 AM
Oct 25 2023 05:27 AM
Does this do what you want?
Fixed date in D2, variable date in E2, difference in F2:
=IF(E2>=D2,NETWORKDAYS(D2,E2)-1,1-NETWORKDAYS(E2,D2))
Oct 25 2023 06:00 AM
Oct 25 2023 06:01 AM
Please avoid asking the same question multiple times - it causes unnecessary duplication of work.
Oct 25 2023 12:27 PM
Oct 25 2023 04:55 PM