Hi,
Thank you to both of you. The correct formula is:

=SUMPRODUCT(($E$2:$E$25=$AC5)*(TEXT($L$2:$L$25,"mmmm")=AD$4)*($L$2:$L$25>=$AN$3)*($L$2:$L$25<=$AO$3)*($D$2:$D$25=$AP$3)*$P$2:$P$25)
Thank you and have a nice time.