Sumproduct using date

J

jhicsupt

I am trying desperately to get sumproduct to work. I need to get sum of
hours before a certain date and hours after a certain date.

Here's what I'm trying to do:
IF Sheet2 A2:A50 = Sheet1 A2 (customer name match)
IF Sheet2 C2:C50 <= Sheet1 C4 (this is date, i.e. 03-2006)
Then sum up Sheet2 G2:G50 (this is hours worked)

Sometimes the formula works, sometimes it displays a 0.

Thanks in advance.
 
T

Tyro

You mention 2 dates but show only one. Does 03-2006 mean March 1, 2006 or
March 31, 2006. Where is the second date?

Tyro
 
J

jhicsupt

Yes, means March 1, 2006

IF Sheet2 C2:C50 <= Sheet1 C4 (this is date, i.e. 03-2006)

Sheet2 C2:C50 has multiple dates. If date is <= 3/1/2006, then add hours in
column G.

Sheet1 C4 has 03-2006
 
T

Tyro

Try this

=SUMPRODUCT((Sheet2!A2:A50=Sheet1!A2)*(Sheet2!C2:C50<=Sheet1!C4)*Sheet2!G2:G50)

Tyro
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Conditional sum in a named range 8
Search and Link across worksheets 2
Problem with SUMPRODUCT 6
SUMPRODUCT 7
Sumproduct /And 2
Multiple criteria for sumproduct 4
Problem with a sumproduct 4
why do i get a #ref 4

Top