Booked nights, per month in Excel

39 Views Asked by At

I have the data set (below a sample). Trying to get the number of nights, in each month

enter image description here

1

There are 1 best solutions below

0
Tom Sharpe On

I'm assuming that as the day of arrival goes with the first night, if someone arrived on 30th April and left on 1st May, that would count one night in April and zero nights in May. Using a slightly modified overlap formula:

=IF(MIN(EDATE(C$1,1),$B2)<=MAX(C$1,$A2),"",MIN(EDATE(C$1,1),$B2)-MAX(C$1,$A2))

enter image description here

assuming that a formula solution is OK.