I think the requirement is to show the number of days in each month, not just the total days, so if you have start date in A2 and end date in B2 (or "Not Yet") and the first of each month listed in D1 across then try this formula in D2 copied across and down
=MAX(MIN(EOMONTH(D$1,0),IF($B2="Not Yet",TODAY(),$B2)-1)+1-MAX(D$1,$A2),0)
For "Not Yet" entries the end date used will be today - see attached
That doesn't count the end date (like hotel stays) so if you want to count that remove the -1, i.e. use
=MAX(MIN(EOMONTH(D$1,0),IF($B2="Not Yet",TODAY(),$B2))+1-MAX(D$1,$A2),0)
Bookmarks