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

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
[TABLE="class: grid"]
<tbody>[TR]
[TD][/TD]
[TD]
A
[/TD]
[TD]
B
[/TD]
[TD]
C
[/TD]
[TD]
D
[/TD]
[TD]
E
[/TD]
[TD]
F
[/TD]
[TD]
G
[/TD]
[TD]
H
[/TD]
[TD]
I
[/TD]
[/TR]
[TR]
[TD]
1
[/TD]
[TD]month[/TD]
[TD]customer[/TD]
[TD]mike[/TD]
[TD]jane[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
2
[/TD]
[TD]
1​
[/TD]
[TD]abc123[/TD]
[TD]plt123[/TD]
[TD]abc123[/TD]
[TD][/TD]
[TD]month start[/TD]
[TD]month end[/TD]
[TD]mike customer[/TD]
[TD]jane customer[/TD]
[/TR]
[TR]
[TD]
3
[/TD]
[TD]
2​
[/TD]
[TD]zsw123[/TD]
[TD]zsw123[/TD]
[TD]mkl123[/TD]
[TD][/TD]
[TD]
1​
[/TD]
[TD]
6​
[/TD]
[TD]
3​
[/TD]
[TD]
5​
[/TD]
[/TR]
[TR]
[TD]
4
[/TD]
[TD]
3​
[/TD]
[TD]mkl123[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
5
[/TD]
[TD]
3​
[/TD]
[TD]plt123[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
6
[/TD]
[TD]
5​
[/TD]
[TD]mkl123[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
7
[/TD]
[TD]
6​
[/TD]
[TD]abc123[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
8
[/TD]
[TD]
6​
[/TD]
[TD]zsw123[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
9
[/TD]
[TD]
6​
[/TD]
[TD]abc123[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
10
[/TD]
[TD]
7​
[/TD]
[TD]plt123[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
11
[/TD]
[TD]
8​
[/TD]
[TD]mkl123[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
12
[/TD]
[TD]
9​
[/TD]
[TD]mkl123[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

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,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

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