sumproduct using a date range

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

this is the formula that I've used before but not needing dates so I'm having
trouble.

=SUMPRODUCT(--('PO Numbers'!$K$4:$K$240=17407),--('PO
Numbers'!$A$4:$A$240=1/0/7),'PO Numbers'!$J$4:$J$240)

I need it to calculate if column K = 17407 and if in column A the date is
between 7/1/2007 to 7/31/2007 to pull the numbers in column J.

So my attempt at that is the =1/0/07 in the formula above. someone help.
 
One way:

=SUMPRODUCT(--('PO Numbers'!$K$4:$K$240=17407), --('PO
Numbers'!$A$4:$A$240>=DATE(2007,7,1)), --('PO
Numbers'!$A$4:$A$240<=DATE(2007,7,31)), 'PO Numbers'!$J$4:$J$240)
 
This returned a #REF error.

JE McGimpsey said:
One way:

=SUMPRODUCT(--('PO Numbers'!$K$4:$K$240=17407), --('PO
Numbers'!$A$4:$A$240>=DATE(2007,7,1)), --('PO
Numbers'!$A$4:$A$240<=DATE(2007,7,31)), 'PO Numbers'!$J$4:$J$240)
 
Well, it's *your* sheet name, so make sure that there aren't any extra
spaces/etc. in all of the sheet names...
 
Back
Top