I have a series of dates (consecutive weeks) each of which falls into one of 4 period. The dates are dynamic based on a given start date. The period assignments are manual inputs that change from use case to use case.

How do I identify the Start and End dates of each period? Please keep in mind the dates, number of periods, and duration of periods change from use case to use case.

I thought about using a MIN and MAX to find the stand and end dates in a given range, but I'm having difficulty writing an INDEX(MATCH,MATCH) formula that will identify the range dynamically from which to select the MAX and MIN.

The attached spreadsheet includes the dates and period assignments. Book1.xlsx