Summing between two dates

  • Thread starter Thread starter Don
  • Start date Start date
D

Don

I have a list of sales data. Column A is a list of dates (workdays). Column
B is the corresponding sales for those days.

I need to write a formula that will give me the sum of prior years sales
from the first of that year to the current date of that year. For instance,
today's date is 7/29/08. I want a formula that will sum the sales between
1/1/07 through 7/29/07. Any help would be appreciated.
 
Try this:

=SUMPRODUCT((A1:A100>=DATE(YEAR(TODAY())-1,1,1))*(A1:A100<=DATE(YEAR(TODAY())-1,MONTH(TODAY()),DAY(TODAY())))*B1:B100)

Hope this helps.

Pete
 
Thank you.
--
Don Rountree


Pete_UK said:
Try this:

=SUMPRODUCT((A1:A100>=DATE(YEAR(TODAY())-1,1,1))*(A1:A100<=DATE(YEAR(TODAY())-1,MONTH(TODAY()),DAY(TODAY())))*B1:B100)

Hope this helps.

Pete
 

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

Sum between Dates 3
Sum with multiple conditions 6
two variables to get result 1
Average with Condition 4
How to sum by month 8
Max function 13
Sum multiple worksheet sales data by month 4
Latest date with condition 6

Back
Top