The following function, when copied down is giving me the same result, when I know that it should be different.

=SUMPRODUCT((Table_Query_from_MS_Access_Database3[PNAME1]=$A$1)*1,(MONTH(Table_Query_from_MS_Access_Database3[DUEDATE]=$A40))*1,Table_Query_from_MS_Access_Database3[QORD])

I have a database table that this is referencing. First I have it look at the PNAME and if it is = to my A1 cell, then it moves to the month. If the date falls in the month in A40. Then it returns the QORD, quantity on order.

I have 75 on order for June. However this function is giving me 75 for every month. Is it summing all months up somehow? I just want it to sum up multiple orders in the same month.

Any help is much appreciated.

Thanks