Not sure how you ID the value in Z3, I can see that it = R6, but why isnt R8 also included?

Maybe try playing around with this, and see where you get?
=SUMIFS(R:R,P:P,">"&EOMONTH(Y3,-1),P:P,"<="&EOMONTH(Y3,0))
This sums ALL values in feb - you could add more criteria if you want