Sum for given date range for given item - can't find this for the life of me

F

Finny

I've got a simple problem but the solution is alluding me.
Simply:
A B C
Sept 1 | Apples | 3
Sept 1 | Oranges | 5
Sept 2 | Apples | 2
Sept 2 | Oranges | 4
Sept 3 | Apples | 3
Sept 3 | Oranges | 8

ex.
I need to sum how many apples I've sold for a given date range (Sept 1
to Sept 2 inclusive).

I can sumif by date, or drill down to a given sale, but to sum I can't
figure out.

Thanks in advance for any help.
 
D

Don Guillett

one way
=SUMPRODUCT((MONTH(F1:F6)=9)*(DAY(F1:F6)={1,2})*(G1:G6="apples")*H1:H6)
 
F

Finny

Thanks Don.
I was about to post my solution:
=SUMPRODUCT((F8:F38>=C2)*(F8:F38<D2)*(G8:G38="apples")*(H8:H38))
C2 = Start Date
D2 = End Date
 
D

Don Guillett

Either works
=SUMPRODUCT((F8:F38>=C2)*(F8:F38<D2)*(G8:G38="apples")*(H8:H38))
or
=SUMPRODUCT((F8:F38>=C2)*(F8:F38<D2)*(G8:G38="apples")*H8:H38)
 

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

Top