Thank you very much. The problem is solved with a little change.

-ROUNDUP((MONTH(P2)-MONTH(R2)+((YEAR(P2)-YEAR(R2))*12))/M2,0)

Regards