Sumproduct

laxjuan05

New Member
Joined
Jan 3, 2017
Messages
21
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Start Date[/TD]
[TD]3/1/2017[/TD]
[/TR]
[TR]
[TD]plan A[/TD]
[TD]3/1/2017[/TD]
[TD][/TD]
[TD][/TD]
[TD]End Date[/TD]
[TD]4/1/2017[/TD]
[/TR]
[TR]
[TD]Plan B[/TD]
[TD][/TD]
[TD]3/15/2017[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Plan C[/TD]
[TD][/TD]
[TD]3/1/2017[/TD]
[TD]3/22/2017[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Plan D[/TD]
[TD]5/28/2017[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Hi,

I need help figuring out how to get a return value for the number of plans in Column A if there is a date between 3/1/2017 and 4/1/2017 in column B,C, or D. The answer I am trying to get is 3 since there is three plans with those dates criteria.

I am using =SUMPRODUCT((B:D>=F1)*(B:D<F2)) but that returns 4 since there is four cells with dates that meet the criteria.
Is there any way to put in a formula that would return the number of plans that are in column A no matter if there is dates that meet the criteria in two columns of the plan row?

Thank you for your help!
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Re: Sumproduct Help

Maybe...


[Table="class: grid"][tr][td="bgcolor: #DCE6F1"][/td][td="bgcolor: #DCE6F1"]
A
[/td][td="bgcolor: #DCE6F1"]
B
[/td][td="bgcolor: #DCE6F1"]
C
[/td][td="bgcolor: #DCE6F1"]
D
[/td][td="bgcolor: #DCE6F1"]
E
[/td][td="bgcolor: #DCE6F1"]
F
[/td][td="bgcolor: #DCE6F1"]
G
[/td][/tr]
[tr][td="bgcolor: #DCE6F1"]
1
[/td][td]
Plans​
[/td][td]
Date1​
[/td][td]
Date2​
[/td][td]
Date3​
[/td][td]
Start Date​
[/td][td]
03/01/2017​
[/td][td]
Result​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
2
[/td][td]
plan A​
[/td][td]
03/01/2017​
[/td][td][/td][td][/td][td]
End Date​
[/td][td]
04/01/2017​
[/td][td="bgcolor:#D9D9D9"]
3​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
3
[/td][td]
Plan B​
[/td][td][/td][td]
03/15/2017​
[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
4
[/td][td]
Plan C​
[/td][td][/td][td]
03/01/2017​
[/td][td]
03/22/2017​
[/td][td][/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
5
[/td][td]
Plan D​
[/td][td]
05/28/2017​
[/td][td][/td][td][/td][td][/td][td][/td][td][/td][/tr]
[/table]


Formula in G2
=SUMPRODUCT(--(MMULT(($B$2:$D$5>=$F$1)*($B$2:$D$5<=$F$2),{1;1;1})>0))

M.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

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
Back
Top