CountDOWInMonthλ() counts the number of a specific weekday in a month.
CountDOWInMonthλ( Dates, DayOfWeek)
Dates
(Required) This is a date for each month. The date may be any date within the month.
DayOfWeek
(Required) This is the number of day of the week we want to count. Sundays are 1 and Saturdays are 7.
Out client is a manufacturer. Sales have increased beyond their current production capacity. One of the company's options is to run weekends. To get their workforce to work those days requires a 50% pay premium for Saturdays and a 100% premium for Sundays. So the company has asked its FP&A team to determine the net profit impact. This requires knowing how many Saturdays, and how many Sundays are in each month while this situation lasts.
We are using CountDOWInMonthλ() to determine how many of each weekday are in each month so we can calculate production costs.