#### OverKnight

##### New Member

- Joined
- Jun 13, 2011

- Messages
- 10

INT((T$4-WEEKDAY(T$4-S5)-DATE(YEAR(T$4),1,-7))/7)-SUMPRODUCT((WEEKDAY(T$5:T$10,2)=S5)*(YEAR(T$5:T$10)=YEAR(T$4))*(T$5:T$10<=T$4))

I was using this formula in a worksheet I updated monthly, but now I need to be able to compare monthly to year-to-date. This formula is in P19:P23, with S5:S10 updated for each row.

• T4contains yesterday’s date (yesterday, because the data on this sheet are updated the following day).

• S5:T10 contains the legal holidays for the year.

I would like to be able to change this formula to show the number of workdays in a given month. This formula is currently returning 9, 8, 8, 8 and 8 for Monday through Friday, which is correct for the first two months of 2016. The correct values for February are 5, 4, 4, 4 and 4. I’d guess a start and end date needs to be added to this formula, but if this is the correct approach, I have no idea how to do this. I searched for this, but could not find a solution that lists each day of the week. Can anyone recommend a solution?

Thank you.