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.