Firstly attaching a workbook makes life much easier as things don't need to be retyped and having dates for the months to perform the calculation on
=if(and(startdate <= eomonth(monthdate,0),enddate>=monthdate), min(enddate,eomonth(monthdate,0))-max(startdate,monthdate)+1,"no")
is along the line you want so if in H1 you put the date 1-feb-20
and the first row of data was 3
in h3
=if(and(e3 <= eomonth(H1,0),f3>=H1), min(f3,eomonth(H1,0))-max(e3,H1)+1,"no")
tou may need to swap, for ; depending on your locale
Bookmarks