Countifs?

hp75150

New Member
Joined
Sep 10, 2014
Messages
31
Office Version
  1. 365
Platform
  1. Windows
I have the sample sheet below. I need to count how many y's and n's there are for each ad week per store. I tried a few different countifs with no luck. Any help is appreciated.


[TABLE="width: 168"]
<colgroup><col width="22" style="width: 17pt; mso-width-source: userset; mso-width-alt: 804;"> <col width="73" style="width: 55pt; mso-width-source: userset; mso-width-alt: 2669;"> <col width="64" style="width: 48pt;" span="2"> <tbody>[TR]
[TD="width: 22, bgcolor: transparent"]1[/TD]
[TD="width: 73, bgcolor: transparent"]A[/TD]
[TD="width: 64, bgcolor: transparent"]B[/TD]
[TD="width: 64, bgcolor: transparent"]C[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]2[/TD]
[TD="bgcolor: transparent"]Ad Week[/TD]
[TD="bgcolor: transparent"]Store #[/TD]
[TD="bgcolor: transparent"]Y/N[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]3[/TD]
[TD="bgcolor: transparent"]1910[/TD]
[TD="bgcolor: transparent"]205[/TD]
[TD="bgcolor: transparent"]y[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]4[/TD]
[TD="bgcolor: transparent"]1910[/TD]
[TD="bgcolor: transparent"]205[/TD]
[TD="bgcolor: transparent"]n[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]5[/TD]
[TD="bgcolor: transparent"]1910[/TD]
[TD="bgcolor: transparent"]205[/TD]
[TD="bgcolor: transparent"]y[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]6[/TD]
[TD="bgcolor: transparent"]1915[/TD]
[TD="bgcolor: transparent"]205[/TD]
[TD="bgcolor: transparent"]n[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]7[/TD]
[TD="bgcolor: transparent"]1915[/TD]
[TD="bgcolor: transparent"]205[/TD]
[TD="bgcolor: transparent"]y[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]8[/TD]
[TD="bgcolor: transparent"]1915[/TD]
[TD="bgcolor: transparent"]205[/TD]
[TD="bgcolor: transparent"]n[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]9[/TD]
[TD="bgcolor: transparent"]1910[/TD]
[TD="bgcolor: transparent"]215[/TD]
[TD="bgcolor: transparent"]n[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]10[/TD]
[TD="bgcolor: transparent"]1910[/TD]
[TD="bgcolor: transparent"]215[/TD]
[TD="bgcolor: transparent"]y[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]11[/TD]
[TD="bgcolor: transparent"]1910[/TD]
[TD="bgcolor: transparent"]215[/TD]
[TD="bgcolor: transparent"]n[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]12[/TD]
[TD="bgcolor: transparent"]1915[/TD]
[TD="bgcolor: transparent"]215[/TD]
[TD="bgcolor: transparent"]n[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]13[/TD]
[TD="bgcolor: transparent"]1915[/TD]
[TD="bgcolor: transparent"]215[/TD]
[TD="bgcolor: transparent"]y[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]14[/TD]
[TD="bgcolor: transparent"]1915[/TD]
[TD="bgcolor: transparent"]215[/TD]
[TD="bgcolor: transparent"]n[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Hey,

In cell D2 type "Yes" and cell E2 type "No" then add the following 2 formulas:

Try in cell D3:
=SUMPRODUCT(($A3=$A$3:$A$14)*($B3=$B$3:$B$14)*($C$3:$C$14="y"))

And then in E3:
=SUMPRODUCT(($A3=$A$3:$A$14)*($B3=$B$3:$B$14)*($C$3:$C$14="n"))
 
Last edited:
Upvote 0
How about


Excel 2013/2016
ABCDEF
1Ad WeekStore #Y/N1910205
21910205yy2
31910205nn1
41910205y
51915205n
61915205y
71915205n
81910215n
91910215y
101910215n
111915215n
121915215y
131915215n
Scratch
Cell Formulas
RangeFormula
E2=COUNTIFS($A$2:$A$13,$E$1,$B$2:$B$13,$F$1,$C$2:$C$13,$D2)
 
Upvote 0
Pivot Table?


[TABLE="class: grid"]
<tbody>[TR]
[TD]
Counting of Y/N​
[/TD]
[TD][/TD]
[TD]
Y/N​
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
Ad Week​
[/TD]
[TD]
Store #​
[/TD]
[TD]
n​
[/TD]
[TD]
y​
[/TD]
[TD]
Grand Total​
[/TD]
[/TR]
[TR]
[TD]
1910​
[/TD]
[TD]
205​
[/TD]
[TD]
1​
[/TD]
[TD]
2​
[/TD]
[TD]
3​
[/TD]
[/TR]
[TR]
[TD]
1910​
[/TD]
[TD]
215​
[/TD]
[TD]
2​
[/TD]
[TD]
1​
[/TD]
[TD]
3​
[/TD]
[/TR]
[TR]
[TD]
1910 Total​
[/TD]
[TD][/TD]
[TD]
3​
[/TD]
[TD]
3​
[/TD]
[TD]
6​
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
1915​
[/TD]
[TD]
205​
[/TD]
[TD]
2​
[/TD]
[TD]
1​
[/TD]
[TD]
3​
[/TD]
[/TR]
[TR]
[TD]
1915​
[/TD]
[TD]
215​
[/TD]
[TD]
2​
[/TD]
[TD]
1​
[/TD]
[TD]
3​
[/TD]
[/TR]
[TR]
[TD]
1915 Total​
[/TD]
[TD][/TD]
[TD]
4​
[/TD]
[TD]
2​
[/TD]
[TD]
6​
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
Grand Total​
[/TD]
[TD][/TD]
[TD]
7​
[/TD]
[TD]
5​
[/TD]
[TD]
12​
[/TD]
[/TR]
</tbody>[/TABLE]


M.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,334
Members
452,636
Latest member
laura12345

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