0

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

enter image description here

braX
  • 11,506
  • 5
  • 20
  • 33
abdul
  • 1

1 Answers1

0

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.

Tom Sharpe
  • 30,727
  • 5
  • 24
  • 37