5g: OverlapDaysλ() 

Description

OverlapDaysλ() counts the days shared between two sets of periods.

Syntax

OverLapDaysλ(Period1Start, Period1End, Period2Start, Period2End, [Diagnostics])

Period1Start
(Required) First period's start date.

Period1End
(Required) First period's end date.

Period2Start
(Required) Second period's start date.

Period2End
(Required) Second period's end date.

Diagnostics
(Optional) If TRUE, input errors that can occur after formula entry will display as diagnostic messages. The default is FALSE. It is recommended that models have a named range called Diagnostics and this named range be set to TRUE during model development and then set to FALSE when the model is placed into production. 

If period one's start and end dates are arrays, they must each be their own row and period two's start and end dates must each be in their own column, or vice-versa.

Example

Our rental business charges by the day but bills by the week. To accurately bill customers we need to calculate how many days our customers rented an item within each week. For full weeks we know this is always going to be seven days. But for the beginning and ending of the rental, the number of days can vary.