SUMPRODUCT() with multiple expressions between dates

tedhekman

New Member
Joined
Jan 20, 2005
Messages
2
Ok here is the (working) formula I currently have, where Column A is a list of dates(about 0-20 entries per day) and Column B is a text string. It is returning the number of entries with the date 1/1/2004 in column A and the letter "X" in column B.
=SUMPRODUCT((A1:A2008=DATE(2004,1,1))*(B1:B2008="X"))

Now what I want to do is instead of just returning the appropriate entries with date 1/1/2004, I want to return the number of entries with a date between 1/1/2004 and 1/20/2004 - or any other dates I may specify.

Can someone please help me out? Much appreciated!

-ted
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
=SUMPRODUCT(--($A$1:$A$2008>=E2),--($A$1:$A$2008<=F2),--($B$1:$B$2008="X"))

where E2:F2 houses the date conditions with E2<=F2.
 

Forum statistics

Threads
1,181,785
Messages
5,932,033
Members
436,814
Latest member
Yurop

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top