1. Select a blank cell you will return the start date (in our case we select the Cell B5), enter the formula: =MAX(DATE(B1,1,1),DATE(B1,1,1)-WEEKDAY(DATE(B1,1,1),2)+(B2-1)*7+1),
2. Select another blank cell you will return the end date (in our case we select the Cell B6), enter =MIN(DATE(B1+1,1,0),DATE(B1,1,1)-WEEKDAY(DATE(B1,1,1),2)+B2*7),