ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Sum for given date range for given item - can't find this for the life of me (https://www.excelbanter.com/excel-programming/378434-sum-given-date-range-given-item-cant-find-life-me.html)

Finny[_3_]

Sum for given date range for given item - can't find this for the life of me
 
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.


Don Guillett

Sum for given date range for given item - can't find this for the life of me
 
one way
=SUMPRODUCT((MONTH(F1:F6)=9)*(DAY(F1:F6)={1,2})*(G 1:G6="apples")*H1:H6)

--
Don Guillett
SalesAid Software

"Finny" wrote in message
oups.com...
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.




Finny[_3_]

Sum for given date range for given item - solved
 
Thanks Don.
I was about to post my solution:
=SUMPRODUCT((F8:F38=C2)*(F8:F38<D2)*(G8:G38="appl es")*(H8:H38))
C2 = Start Date
D2 = End Date

Don Guillett wrote:
one way
=SUMPRODUCT((MONTH(F1:F6)=9)*(DAY(F1:F6)={1,2})*(G 1:G6="apples")*H1:H6)

--
Don Guillett
SalesAid Software

"Finny" wrote in message
oups.com...
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.



Don Guillett

Sum for given date range for given item - solved
 
Either works
=SUMPRODUCT((F8:F38=C2)*(F8:F38<D2)*(G8:G38="appl es")*(H8:H38))
or
=SUMPRODUCT((F8:F38=C2)*(F8:F38<D2)*(G8:G38="appl es")*H8:H38)


--
Don Guillett
SalesAid Software

"Finny" wrote in message
ps.com...
Thanks Don.
I was about to post my solution:
=SUMPRODUCT((F8:F38=C2)*(F8:F38<D2)*(G8:G38="appl es")*(H8:H38))
C2 = Start Date
D2 = End Date

Don Guillett wrote:
one way
=SUMPRODUCT((MONTH(F1:F6)=9)*(DAY(F1:F6)={1,2})*(G 1:G6="apples")*H1:H6)

--
Don Guillett
SalesAid Software

"Finny" wrote in message
oups.com...
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.






All times are GMT +1. The time now is 03:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com