countifs or sumproduct help

greight

New Member
Joined
Oct 12, 2016
Messages
2
Hi, I have some data like below.

Month Customer MIKE JANE
1 ABC123 PLT123 ABC123
2 ZSW123 ZSW123 MKL123
3 MKL123
3 PLT123
5 MKL123
6 PLT123
6 ABC123
6 ZSW123
6 ABC123
7 PLT123
8 MKL123
9 MKL123

I have setup two ranges, MIKE (mike's list of customers) and JANE (jane's list of customers). User will select start month and end month. I need the formula to count the number of occurances for the MIKE and JANE defined range between those two dates. I used countifs to count between the two dates where i have a single criteria $A15 (I2 and J2 are start and end month).

=MINUS(countifs(Data16!$V$2:$V$5330,$A15,Data16!$F$2:$F$5330,">="&I$2),countifs(Data16!$V$2:$V$5330,$A15,Data16!$F$2:$F$5330,">"&J$2))

But i can't figure out how to evaluate where $A15 is not a single criteria but a range. I was playing with SUMPRODUCT but have only run into roadblocks. Any assistance would be greatly appreciated.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
A
B
C
D
E
F
G
H
I
1
monthcustomermikejane
2
1​
abc123plt123abc123month startmonth endmike customerjane customer
3
2​
zsw123zsw123mkl123
1​
6​
3​
5​
4
3​
mkl123
5
3​
plt123
6
5​
mkl123
7
6​
abc123
8
6​
zsw123
9
6​
abc123
10
7​
plt123
11
8​
mkl123
12
9​
mkl123

<tbody>
</tbody>

h3=SUMPRODUCT((ISNUMBER(MATCH($B$2:$B$12,C$2:C$3,0))*($A$2:$A$12>=$F3)*($A$2:$A$12<=$G3))) copy across
 
Upvote 0

Forum statistics

Threads
1,214,988
Messages
6,122,620
Members
449,092
Latest member
amyap

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