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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
=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,148,525
Messages
5,747,203
Members
424,068
Latest member
Salim khamis

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