Formula to count cells between dates.
Current week
=SUMPRODUCT(--(A1:A100=TODAY()-CHOOSE(WEEKDAY(TODAY()),-1,0,1,2,3,4,5)),--(
A1:A100<TODAY()-CHOOSE(WEEKDAY(TODAY()),-1,0,1,2,3,4,5)+7),B1:B100)
Last 4 weeks
=SUMPRODUCT(--(A1:A100=TODAY()-CHOOSE(WEEKDAY(TODAY()),-1,0,1,2,3,4,5)-21),
--(A1:A100<TODAY()-CHOOSE(WEEKDAY(TODAY()),-1,0,1,2,3,4,5)+7),B1:B100)
entire year
=SUMPRODUCT(--(YEAR(A1:A100)=YEAR(TODAY())),B1:B100)
--
HTH
Bob Phillips
(replace xxxx in the email address with gmail if mailing direct)
"Vegs" wrote in message
...
I need to count the over the last week of a specific P/N .
Then I need the quantity manufactured over the last 4 weeks and finally
over
the current year. The spreadsheet data will be entered daily for the
entire
year and reviewed on a weekly basis.
|