Total number of days excluded weekends

Hi Team,

Would like to check what is the issue of my expression below:

(HOUR([Leave End Date]-[Leave Start Date]) + (IF(WEEKDAY([Leave Start Date])<=5,0,IF(WEEKDAY([Leave End Date])<=WEEKDAY([Leave Start Date]),-2,-1))) * 24) / 24

I want to get the total number of leaves under the Total Leave Duration column (Number column type) but when I tried to leave for 5 days which is March 27 to 31, it shows a total of 4 only. See Screenshot below.

Sample total.JPG

Not sure what I need to change in my expression. Thanks

0 1 64
1 REPLY 1

You can use the NETWORKDAYS() function in GSheets for this.

Top Labels in this Space