What should formula look like to define date range on SUMIF

K

Kane

Basically, I want to select a date range of records and apply the SUMIF
formula to the selected records.

What should that formula look like? For example, for pants sold before
10/22/2009 and after 10/2/2009?
A B C
1 Date Description Amount
2 10/1/2009 pants 100
3 10/15/2009pants 100
4 10/16/2009pants 200
5 10/22/2009pants 300
6 10/23/2009pants 400
7 9/22/2009 pants 500
8 11/2/2009 pants 600
9 9/3/2009 pants 700
 
T

Teethless mama

=SUMPRODUCT((A2:A100>DATE(2009,10,2))*(A2:A100<DATE(2009,10,22))*(B2:B100="pants"),C2:C100)
 
A

Ashish Mathur

Hi,

=sumif(B2:B9,">="&B12,C2:C9)-sumif(B2:B9,"<"&B11,C2:C9)

B12 holds the beginning date and B11 holds the ending date

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com
 

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