简体   繁体   中英

Booked nights, per month in Excel

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

在此处输入图像描述

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))

在此处输入图像描述

assuming that a formula solution is OK.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM