Some kind of COUNTIF AND Statement maybe ?

Dazzybeeguy

Board Regular
Joined
Jan 6, 2022
Messages
72
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
If I had a spreadsheet with information as shown below, so dates in Column A and "Y" or "N" in columns B, C & D and a date in say F2

What I want is a formula that says look at the date in F2, find the corresponding date in row A:A and count how many Ys are in column B:B when the dates match.

A B C D E
4 31/12 Y N N
5 30/12 N Y N
6 29/12 N N Y

Thank you for any help you can give.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Just col B or col B, C & D
 
Upvote 0
do you want count of Y from column B only or from column B C and D
 
Upvote 0
Just col B or col B, C & D
Hi, I would just duplicate the formula into two other cells that relate to column C and D, Or I could have in Addition to Cell F2 showing the date have another Cell ( say G2) have a validation list where they pick the relevant Column they want to count the Ys in
 
Upvote 0
Ok, how about
Excel Formula:
=COUNTIFS(A:A,F2,B:B,"Y")
 
Upvote 0
Try

Book5
ABCDEFGHIJ
1ABCDDateCount of Y in BCount of Y in CCount of Y in D
231-DecYNN29-Dec101
330-DecNYN
429-DecYNY
5
6
Sheet2
Cell Formulas
RangeFormula
G2:I2G2=COUNTIFS($A:$A,$F2,B:B,"Y")
 
Upvote 0
If you want a drop down, for the col
+Fluff 1.xlsm
ABCDEFG
1ABCB
231/12/2022YNN30/12/20221
330/12/2022NYN
429/12/2022NNY
5
6
Data
Cell Formulas
RangeFormula
G2G2=COUNTIFS(A:A,F2,INDEX(B:D,0,MATCH(G1,B1:D1,0)),"Y")
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,991
Messages
6,122,628
Members
449,095
Latest member
bsb1122

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