Forum Discussion

g1davies's avatar
g1davies
Copper Contributor
Apr 02, 2024
Solved

Start and End Date of each Month in a date period

Hi,   I hope you can help, I am trying to see the start and end dates per month within a date period. Like the below, I can get it to work but it is not dynamic so when I change the dates by more t...
  • HansVogelaar's avatar
    Apr 02, 2024

    g1davies 

    Would this be acceptable?

    The formula in D1 is

     

    =LET(startdate, B2, enddate, B3, firstofmonth, startdate-DAY(startdate)+1, monthstart, EDATE(firstofmonth, SEQUENCE(, DATEDIF(firstofmonth, enddate, "M")+1, 0)), startdates, IF(monthstart<startdate, startdate, monthstart), monthend, EOMONTH(startdates, 0), enddates, IF(monthend>enddate, enddate, monthend), VSTACK(TEXT(startdates, "mmmm"), startdates, enddates))

     

Resources