A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Try this:
=SUMIFS($AM$7:$AM$150,$AJ$7:$AJ$150,D32,$AL$7:$AL$150,"<"&O31,$AL$7:$AL$150,">"&N31)
I hope I guessed correctly with the dates to compare in O31 and N31 for the greater than and less than, but it was difficult from the illustrations to determine the columns/rows for certain. If not, then reverse them.