Countif

undemane

Board Regular
Joined
Nov 19, 2007
Messages
75
I have data as shown below. The key are "TYPE" and "TEST RESULTS". I want to know the count of how many tests were PV1 + PASS; and PV2 + PASS and count them in the far right two columns (I showed the counts manually - e.g., on 10/1/20, there are 3 PV2s that Passed). If the results say "NOK" then I skip that test.

I have "Date" going from 9/28 to 4/30/2021 and the data on the left going from A1:A600.

TypePV1 Planned CompletePV1 Actual CompletePV1 NOK Res DatePV2 Planned CompletePV2 Actual CompletePV2 NOK Res DateTest ResultsDatePV1 PASS Actual CompletePV2 PASS Actual Complete
PV29/29/20209/29/20201/0/19009/29/20209/29/202010/29/2020PASS9/28/2020
PV110/1/202010/1/20201/0/19001/0/19001/0/19001/0/1900PASS9/29/20201
PV29/28/20209/28/20201/0/190010/1/202010/1/202010/30/2020PASS9/30/2020
PV21/0/19001/0/19001/0/190010/1/202010/1/202010/31/2020PASS10/1/202013
PV21/0/19001/0/19001/0/190010/1/202010/1/202011/1/2020PASS10/2/2020
PV21/0/19001/0/19001/0/190010/28/20201/0/190011/4/2020NOK10/3/2020
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
How about
+Fluff v2.xlsm
ABCDEFGHIJKL
1TypePV1 Planned CompletePV1 Actual CompletePV1 NOK Res DatePV2 Planned CompletePV2 Actual CompletePV2 NOK Res DateTest ResultsDatePV1 PASS Actual CompletePV2 PASS Actual Complete
2PV229/09/202029/09/202000/01/190029/09/202029/09/202029/10/2020PASS28/09/202000
3PV101/10/202001/10/202000/01/190000/01/190000/01/190000/01/1900PASS29/09/202001
4PV228/09/202028/09/202000/01/190001/10/202001/10/202030/10/2020PASS30/09/202000
5PV200/01/190000/01/190000/01/190001/10/202001/10/202031/10/2020PASS01/10/202013
6PV200/01/190000/01/190000/01/190001/10/202001/10/202001/11/2020PASS02/10/202000
7PV200/01/190000/01/190000/01/190028/10/202000/01/190004/11/2020NOK03/10/202000
Main
Cell Formulas
RangeFormula
K2:K7K2=COUNTIFS(A:A,"PV1",C:C,J2,H:H,"Pass")
L2:L7L2=COUNTIFS(A:A,"PV2",F:F,J2,H:H,"Pass")
 
Upvote 0
How about
+Fluff v2.xlsm
ABCDEFGHIJKL
1TypePV1 Planned CompletePV1 Actual CompletePV1 NOK Res DatePV2 Planned CompletePV2 Actual CompletePV2 NOK Res DateTest ResultsDatePV1 PASS Actual CompletePV2 PASS Actual Complete
2PV229/09/202029/09/202000/01/190029/09/202029/09/202029/10/2020PASS28/09/202000
3PV101/10/202001/10/202000/01/190000/01/190000/01/190000/01/1900PASS29/09/202001
4PV228/09/202028/09/202000/01/190001/10/202001/10/202030/10/2020PASS30/09/202000
5PV200/01/190000/01/190000/01/190001/10/202001/10/202031/10/2020PASS01/10/202013
6PV200/01/190000/01/190000/01/190001/10/202001/10/202001/11/2020PASS02/10/202000
7PV200/01/190000/01/190000/01/190028/10/202000/01/190004/11/2020NOK03/10/202000
Main
Cell Formulas
RangeFormula
K2:K7K2=COUNTIFS(A:A,"PV1",C:C,J2,H:H,"Pass")
L2:L7L2=COUNTIFS(A:A,"PV2",F:F,J2,H:H,"Pass")
Thank you!
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,045
Messages
6,122,840
Members
449,096
Latest member
Erald

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