Hello Belleka
can be made dynamic as:
=IFERROR(DATEDIF(MAX($B$2,DATE($F$1,1,1)),MIN(DATE($F$1+1,1,1),$C2),"M"),0
Here, I replaced the static reference F$1 with the dynamic reference $F$1, so if you copy the formula to another cell, it adjusts the reference accordingly.