First insert two columns in between A & B colums as data in your attached file.
Now put this formuls with CSE in cell B2
Code:
=SMALL(IFERROR(INT(MID($A2,SMALL(IF(MID(" " & $A2,ROW($A$1:$A$100),1)=" ",ROW($A$1:$A$100),""),ROW($A$1:$A$100)), SMALL(IF(MID($A2&" ",ROW($A$1:$A$100),1)=" ",ROW($A$1:$A$100),""),ROW($A$1:$A$100))-SMALL(IF(MID(" " & $A2,ROW($A$1:$A$100),1)=" ",ROW($A$1:$A$100),""),ROW($A$1:$A$100)))),""),COLUMN(A1))
Now drag this formula to C2 and then select B2:C2 and fill down till the data ends.
Now copy below formula and paste it cell D2 adn fill down till the data end
Code:
=IFERROR(IF(((((C2+1)-B2)/30)-1)=0,TEXT(DATE(YEAR($D$1),MONTH($D$1)-(((B2-1)/30)+1),DAY($D$1)),"MMMM YYYY"), TEXT(DATE(YEAR(DATE(YEAR($D$1),MONTH($D$1)-(((B2-1)/30)+1),DAY($D$1))),MONTH(DATE(YEAR($D$1),MONTH($D$1)-(((B2-1)/30)+1),DAY($D$1)))-((((C2+1)-B2)/30)-1),DAY(DATE(YEAR($D$1),MONTH($D$1)-(((B2-1)/30)+1),DAY($D$1)))),"MMMM YYYY") & " to " & TEXT(DATE(YEAR($D$1),MONTH($D$1)-(((B2-1)/30)+1),DAY($D$1)),"MMMM YYYY")),TEXT(DATE(YEAR($D$1),MONTH($D$1)-(((B2-1)/30)+1),DAY($D$1)),"MMMM YYYY")&" & Before")
Bookmarks