Asbestos_Jen
Active Member
- Joined
- May 12, 2017
- Messages
- 271
- Office Version
- 2007
- Platform
- Windows
I’m building a tool for users to check their own performance on QA/QC samples without revealing the true values to them (Tbl.Grp1.entry and Tbl.Grp2.entry). Right now I do this manually for each instance.
I’m getting stuck on how best to compare values when the TYPEs are mismatched, and when TRACE quantities are reported or missed contrary to the reference values.
I am interested in the ways this would be so much easier (generally, or with 365), but it must (unfortunately) work in Excel 2007 in order to be useful to all staff.
I'm open to helper columns as needed, and suggestions for a better layout.
The full reference catalogue is ~350 Samples and grows quarterly. I’ve included all of the relevant types of samples (I think) in the Tbl.Ref.Results.
The reporting order of types is irrelevant, except other TYPEs must be reported before NONE.
Samples may contain 0, 1, 2, or 3 TYPEs. All TYPEs and QTYs must match for 0 points (there are exceptions for TRACE amounts). The passing score for a group of 4 Samples is <100 total points.
In the Code(s) column J, I would like to concatenate the codes from column P where the applicable Smp.Result column is TRUE. If this is out of reach, I’ll just use the scoring table to return important results.
I’m getting stuck on how best to compare values when the TYPEs are mismatched, and when TRACE quantities are reported or missed contrary to the reference values.
I am interested in the ways this would be so much easier (generally, or with 365), but it must (unfortunately) work in Excel 2007 in order to be useful to all staff.
I'm open to helper columns as needed, and suggestions for a better layout.
The full reference catalogue is ~350 Samples and grows quarterly. I’ve included all of the relevant types of samples (I think) in the Tbl.Ref.Results.
The reporting order of types is irrelevant, except other TYPEs must be reported before NONE.
Samples may contain 0, 1, 2, or 3 TYPEs. All TYPEs and QTYs must match for 0 points (there are exceptions for TRACE amounts). The passing score for a group of 4 Samples is <100 total points.
In the Code(s) column J, I would like to concatenate the codes from column P where the applicable Smp.Result column is TRUE. If this is out of reach, I’ll just use the scoring table to return important results.
Catalogue - add PF_test.xlsx | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | |||
1 | User input tables | Scoring Explanation | Scoring Code | Points | Smp.1Result | Smp.2Result | Smp.3Result | Smp.4Result | ||||||||||||||||
2 | Tbl.Grp1.entry | Calc'd | Reported all NONE when NONE present (NDPass) | 0 | n/a | n/a | TRUE | n/a | ||||||||||||||||
3 | Smp.# | Sample ID | TYPE 1 | Qty1 | TYPE 2 | Qty2 | TYPE 3 | Qty3 | Points | Code(s) | Pass/Fail | #TYPEs | #Tra | TYPE1 QTY1 match (T1Q1pass) | 0 | TRUE | FALSE | TRUE | FALSE | |||||
4 | Smp.1 | 5408 | Banana | 12 | Radish | 17 | NONE | 0 | 45 | Pass | 2 | 0 | TYPE2 QTY2 match (T2Q2pass) | 0 | #N/A | #N/A | TRUE | TRUE | ||||||
5 | Smp.2 | 4226 | Blackberry | 70 | Blueberry | 0 | NONE | 0 | 20 | Pass | 2 | 1 | TYPE3 QTY3 match (T3Q3pass) | 0 | TRUE | TRUE | TRUE | #N/A | ||||||
6 | Smp.3 | 7618 | NONE | 0 | NONE | 0 | NONE | 0 | 0 | Pass | 0 | 0 | TYPE 1 present (T1pass) | 0 | TRUE | TRUE | TRUE | TRUE | ||||||
7 | Smp.4 | 8266 | Blackberry | 20 | Cauliflower | 0 | NONE | 0 | 70 | Pass | 2 | 1 | TYPE 2 present (T2pass) | 0 | FALSE | FALSE | TRUE | TRUE | ||||||
8 | Total | 135 | n/a | TYPE 3 present (T3pass) | 0 | TRUE | TRUE | TRUE | FALSE | |||||||||||||||
9 | Incorrect ID of TRACE quantity | IDt | 0 | |||||||||||||||||||||
10 | Tbl.Grp2.entry | EXPECTED | /Manual | Reported TRACE TYPE when NONE present | FPt | 1 | FALSE | FALSE | FALSE | FALSE | ||||||||||||||
11 | Smp.# | Sample ID | TYPE 1 | Qty1 | TYPE 2 | Qty2 | TYPE 3 | Qty3 | Points | Code(s) | Pass/Fail | #TYPEs | #Tra | Per sample, first TYPE quantitation outside acceptance range | QTY1 | 20 | FALSE | TRUE | FALSE | TRUE | ||||
12 | Smp.5 | 5408 | Banana | 12 | Radish | 17 | NONE | 0 | 55 | ID2,QTY2 | Pass | 2 | 0 | Per sample, second TYPE quantitation outside acceptance range | QTY2 | 10 | #N/A | #N/A | FALSE | FALSE | ||||
13 | Smp.6 | 4226 | Blackberry | 70 | Blueberry | 0 | NONE | 0 | 21 | QTY1,FPt | Pass | 2 | 1 | Per sample, third TYPE quantitation outside acceptance range | QTY3 | 5 | FALSE | FALSE | FALSE | #N/A | ||||
14 | Smp.7 | 7618 | NONE | 0 | NONE | 0 | NONE | 0 | 0 | Pass | 0 | 0 | Reported at least 1 TYPE when NONE present (false positive) | FP | 100 | FALSE | FALSE | FALSE | FALSE | |||||
15 | Smp.8 | 8266 | Blackberry | 20 | Cauliflower | 0 | NONE | 0 | 25 | FNt | Pass | 2 | 1 | Reported NONE when at least 1 TYPE present (false negative) | FN | 100 | FALSE | FALSE | FALSE | FALSE | ||||
16 | Total | 101 | Fail | Reported 1 TYPE incorrectly: first instance (ID error) | ID | 50 | FALSE | FALSE | -- | FALSE | ||||||||||||||
17 | Failed to report 2nd TYPE in a 2-TYPE Sample | FN2 | 50 | FALSE | FALSE | FALSE | FALSE | |||||||||||||||||
18 | Tbl.Ref.Results | Failed to report 3rd TYPE in a 3-TYPE Sample | FN3 | 25 | FALSE | FALSE | FALSE | TRUE | ||||||||||||||||
19 | Sample ID | TYPE 1 | Lower1 | Upper1 | TYPE 2 | Lower2 | Upper2 | TYPE 3 | Lower3 | Upper3 | #TYPEs | #TRA | Reported 2nd TYPE incorrectly in a 2-TYPE Sample | ID2 | 45 | TRUE | FALSE | FALSE | FALSE | |||||
20 | 5408 | Blackberry | 0 | 15 | Banana | 3 | 25 | NONE | 0 | 0 | 2 | 0 | Reported 3rd TYPE incorrectly in a 3-TYPE Sample | ID3 | 25 | FALSE | FALSE | FALSE | FALSE | |||||
21 | 4226 | Blackberry | 75 | 95 | NONE | 0 | 0 | NONE | 0 | 0 | 1 | 0 | Failed to report TRACE quantity | FNt | 25 | FALSE | FALSE | FALSE | TRUE | |||||
22 | 7618 | NONE | 0 | 0 | NONE | 0 | 0 | NONE | 0 | 0 | 0 | 0 | Total points | -- | -- | 45 | 20 | 0 | 70 | |||||
23 | 8266 | Blackberry | 2 | 15 | Cauliflower | 0 | 0 | Broccoli | 0 | 0 | 3 | 2 | NOTE: report TRACE quantity as 0 | |||||||||||
24 | 8266 | Blackberry | 2 | 15 | Cauliflower | 0 | 0 | Broccoli | 0 | 0 | 3 | 2 | ||||||||||||
25 | 5403 | Banana | 0 | 20 | Blueberry | 0 | 10 | Blackberry | 0 | 2 | 3 | 0 | TYPE | |||||||||||
26 | 3935 | Blackberry | 0 | 10 | Cauliflower | 0 | 0 | Broccoli | 0 | 0 | 3 | 2 | Cauliflower | |||||||||||
27 | 1677 | Blackberry | 0 | 10 | NONE | 0 | 0 | NONE | 0 | 0 | 1 | 0 | Radish | |||||||||||
28 | 9633 | Banana | 0 | 30 | NONE | 0 | 0 | NONE | 0 | 0 | 1 | 0 | Banana | |||||||||||
29 | 9721 | Banana | 0 | 20 | NONE | 0 | 0 | NONE | 0 | 0 | 1 | 0 | Blackberry | |||||||||||
30 | 3385 | Blackberry | 15 | 60 | NONE | 0 | 0 | NONE | 0 | 0 | 1 | 0 | Blueberry | |||||||||||
31 | 3877 | Blackberry | 0 | 20 | NONE | 0 | 0 | NONE | 0 | 0 | 1 | 0 | Broccoli | |||||||||||
32 | 3132 | Radish | 6 | 55 | NONE | 0 | 0 | NONE | 0 | 0 | 1 | 0 | NONE | |||||||||||
PassFailCheck |
Cell Formulas | ||
---|---|---|
Range | Formula | |
S2 | S2 | =IF(COUNTIF($C$20:$K$20,"NONE")<>3,"n/a",COUNTIF($C$4:$H$4,"NONE")=COUNTIF($C$20:$K$20,"NONE")) |
T2 | T2 | =IF(COUNTIF($C$21:$K$21,"NONE")<>3,"n/a",COUNTIF($C$5:$H$5,"NONE")=COUNTIF($C$21:$K$21,"NONE")) |
U2 | U2 | =IF(COUNTIF($C$22:$K$22,"NONE")<>3,"n/a",COUNTIF($C$6:$H$6,"NONE")=COUNTIF($C$22:$K$22,"NONE")) |
V2 | V2 | =IF(COUNTIF($C$23:$K$23,"NONE")<>3,"n/a",COUNTIF($C$7:$H$7,"NONE")=COUNTIF($C$23:$K$23,"NONE")) |
S3:V5 | S3 | =AND(S6=TRUE,S11=FALSE) |
S6 | S6 | =COUNTIF($C$20:$K$20,$C$4)>=1 |
T6 | T6 | =COUNTIF($C$21:$K$21,$C$5)>=1 |
U6 | U6 | =COUNTIF($C$22:$K$22,$C$6)>=1 |
V6 | V6 | =COUNTIF($C$23:$K$23,$C$7)>=1 |
S7 | S7 | =COUNTIF($C$20:$K$20,$E$4)>=1 |
T7 | T7 | =COUNTIF($C$21:$K$21,$E$5)>=1 |
U7 | U7 | =COUNTIF($C$22:$K$22,$E$6)>=1 |
V7 | V7 | =COUNTIF($C$23:$K$23,$E$7)>=1 |
S8 | S8 | =COUNTIF($C$20:$K$20,$G$4)>=1 |
T8 | T8 | =COUNTIF($C$21:$K$21,$G$5)>=1 |
U8 | U8 | =COUNTIF($C$22:$K$22,$G$6)>=1 |
V8 | V8 | =COUNTIF($C$23:$K$23,$G$7)>=1 |
K12:K15,K4:K8 | K4 | =IF(AND(I4<>"",I4<100),"Pass","n/a") |
L12:L15,L4:L7 | L4 | =COUNTIFS(C4:H4,"<>NONE")-COUNT(C4:H4) |
M12:M15,M4:M7 | M4 | =COUNTIFS(C4,"<>"&"NONE",D4,0)+COUNTIFS(E4,"<>"&"NONE",F4,0)+COUNTIFS(G4,"<>"&"NONE",H4,0) |
I4 | I4 | =PassFailCheck!$S$22 |
I5 | I5 | =PassFailCheck!$T$22 |
I6 | I6 | =PassFailCheck!$U$22 |
I7 | I7 | =PassFailCheck!$V$22 |
I8,I16 | I8 | =SUM([Points]) |
J8 | J8 | =CONCATENATE(J4,J5,J6,J7) |
S10 | S10 | =AND(COUNTIF(C20:K20,"none")>COUNTIF(C4:H4,"none"),COUNTIF(C4:H4,0)<=N20) |
T10 | T10 | =AND(COUNTIF(C21:K21,"none")>COUNTIF(C5:H5,"none"),COUNTIF(C5:H5,0)<=N21) |
U10 | U10 | =AND(COUNTIF(C22:K22,"none")>COUNTIF(C6:H6,"none"),COUNTIF(C6:H6,0)<=N22) |
V10 | V10 | =AND(COUNTIF(C23:K23,"none")>COUNTIF(C7:H7,"none"),COUNTIF(C7:H7,0)<=N23) |
S11 | S11 | =OR(D$4<INDEX($C$20:$K$20,1,MATCH(C$4,$C$20:$K$20,0)+1),D$4>INDEX($C$20:$K$20,1,MATCH(C$4,$C$20:$K$20,0)+2)) |
T11 | T11 | =OR(D$5<INDEX($C$21:$K$21,1,MATCH(C$5,$C$21:$K$21,0)+1),D$5>INDEX($C$21:$K$21,1,MATCH(C$5,$C$21:$K$21,0)+2)) |
U11 | U11 | =OR(D$6<INDEX($C$22:$K$22,1,MATCH(C$6,$C$22:$K$22,0)+1),D$6>INDEX($C$22:$K$22,1,MATCH(C$6,$C$22:$K$22,0)+2)) |
V11 | V11 | =OR(D$7<INDEX($C$23:$K$23,1,MATCH(C$7,$C$23:$K$23,0)+1),D$7>INDEX($C$23:$K$23,1,MATCH(C$7,$C$23:$K$23,0)+2)) |
S12 | S12 | =OR(F$4<INDEX($C$20:$K$20,1,MATCH(E$4,$C$20:$K$20,0)+1),F$4>INDEX($C$20:$K$20,1,MATCH(E$4,$C$20:$K$20,0)+2)) |
T12 | T12 | =OR(F$5<INDEX($C$21:$K$21,1,MATCH(E$5,$C$21:$K$21,0)+1),F$5>INDEX($C$21:$K$21,1,MATCH(E$5,$C$21:$K$21,0)+2)) |
U12 | U12 | =OR(F$6<INDEX($C$22:$K$22,1,MATCH(E$6,$C$22:$K$22,0)+1),F$6>INDEX($C$22:$K$22,1,MATCH(E$6,$C$22:$K$22,0)+2)) |
V12 | V12 | =OR(F$7<INDEX($C$23:$K$23,1,MATCH(E$7,$C$23:$K$23,0)+1),F$7>INDEX($C$23:$K$23,1,MATCH(E$7,$C$23:$K$23,0)+2)) |
S13 | S13 | =OR(H$4<INDEX($C$20:$K$20,1,MATCH(G$4,$C$20:$K$20,0)+1),H$4>INDEX($C$20:$K$20,1,MATCH(G$4,$C$20:$K$20,0)+2)) |
T13 | T13 | =OR(H$5<INDEX($C$21:$K$21,1,MATCH(G$5,$C$21:$K$21,0)+1),H$5>INDEX($C$21:$K$21,1,MATCH(G$5,$C$21:$K$21,0)+2)) |
U13 | U13 | =OR(H$6<INDEX($C$22:$K$22,1,MATCH(G$6,$C$22:$K$22,0)+1),H$6>INDEX($C$22:$K$22,1,MATCH(G$6,$C$22:$K$22,0)+2)) |
V13 | V13 | =OR(H$7<INDEX($C$23:$K$23,1,MATCH(G$7,$C$23:$K$23,0)+1),H$7>INDEX($C$23:$K$23,1,MATCH(G$7,$C$23:$K$23,0)+2)) |
S14 | S14 | =AND(COUNTIF($C$4:$H$4,"NONE")<3,COUNTIF($C$20:$K$20,"NONE")=3) |
T14 | T14 | =AND(COUNTIF($C$5:$H$5,"NONE")<3,COUNTIF($C$21:$K$21,"NONE")=3) |
U14 | U14 | =AND(COUNTIF($C$6:$H$6,"NONE")<3,COUNTIF($C$22:$K$22,"NONE")=3) |
V14 | V14 | =AND(COUNTIF($C$7:$H$7,"NONE")<3,COUNTIF($C$23:$K$23,"NONE")=3) |
S15 | S15 | =AND(COUNTIF($C$4:$H$4,"NONE")=3,COUNTIF($C$20:$K$20,"NONE")>=1) |
T15 | T15 | =AND(COUNTIF($C$5:$H$5,"NONE")=3,COUNTIF($C$21:$K$21,"NONE")>=1) |
U15 | U15 | =AND(COUNTIF($C$6:$H$6,"NONE")=3,COUNTIF($C$22:$K$22,"NONE")<3) |
V15 | V15 | =AND(COUNTIF($C$7:$H$7,"NONE")=3,COUNTIF($C$23:$K$23,"NONE")>=1) |
S16 | S16 | =IF(S2=TRUE,"--",COUNTIF($C$20:$I$20,$C$4)<>1) |
T16 | T16 | =IF(T2=TRUE,"--",COUNTIF($C$21:$I$21,$C$5)<>1) |
U16 | U16 | =IF(U2=TRUE,"--",COUNTIF($C$22:$I$22,$C$6)<>1) |
V16 | V16 | =IF(V2=TRUE,"--",COUNTIF($C$23:$I$23,$C$7)<>1) |
S17 | S17 | =AND(COUNTIF($C$20:$K$20,"NONE")=1,COUNTIF($C$4:$H$4,"NONE")>1) |
T17 | T17 | =AND(COUNTIF($C$21:$K$21,"NONE")=1,COUNTIF($C$5:$H$5,"NONE")>1) |
U17 | U17 | =AND(COUNTIF($C$22:$K$22,"NONE")=1,COUNTIF($C$6:$H$6,"NONE")>1) |
V17 | V17 | =AND(COUNTIF($C$23:$K$23,"NONE")=1,COUNTIF($C$7:$H$7,"NONE")>1) |
S18 | S18 | =AND(COUNTIF($C$20:$K$20,"NONE")=0,COUNTIF($C$4:$H$4,"NONE")>0) |
T18 | T18 | =AND(COUNTIF($C$21:$K$21,"NONE")=0,COUNTIF($C$5:$H$5,"NONE")>0) |
U18 | U18 | =AND(COUNTIF($C$22:$K$22,"NONE")=0,COUNTIF($C$6:$H$6,"NONE")>0) |
V18 | V18 | =AND(COUNTIF($C$23:$K$23,"NONE")=0,COUNTIF($C$7:$H$7,"NONE")>0) |
S19 | S19 | =AND(COUNTIF($C$20:$K$20,"NONE")=1,COUNTIF($C$20:$K$20,$C$4)+COUNTIF($C$20:$K$20,$E$4)+COUNTIF($C$20:$K$20,$G$4)=2) |
T19 | T19 | =AND(COUNTIF($C$21:$K$21,"NONE")=1,COUNTIF($C$21:$K$21,$C$5)+COUNTIF($C$21:$K$21,$E$5)+COUNTIF($C$21:$K$21,$G$5)=2) |
U19 | U19 | =AND(COUNTIF($C$22:$K$22,"NONE")=1,COUNTIF($C$22:$K$22,$C$6)+COUNTIF($C$22:$K$22,$E$6)+COUNTIF($C$22:$K$22,$G$6)=2) |
V19 | V19 | =AND(COUNTIF($C$23:$K$23,"NONE")=1,COUNTIF($C$23:$K$23,$C$7)+COUNTIF($C$23:$K$23,$E$7)+COUNTIF($C$23:$K$23,$G$7)=2) |
S20 | S20 | =AND(COUNTIF($C$20:$K$20,"NONE")=0,COUNTIF($C$20:$K$20,$C$4)+COUNTIF($C$20:$K$20,$E$4)+COUNTIF($C$20:$K$20,$G$4)=3) |
T20 | T20 | =AND(COUNTIF($C$21:$K$21,"NONE")=0,COUNTIF($C$21:$K$21,$C$5)+COUNTIF($C$21:$K$21,$E$5)+COUNTIF($C$21:$K$21,$G$5)=3) |
U20 | U20 | =AND(COUNTIF($C$22:$K$22,"NONE")=0,COUNTIF($C$22:$K$22,$C$6)+COUNTIF($C$22:$K$22,$E$6)+COUNTIF($C$22:$K$22,$G$6)=3) |
V20 | V20 | =AND(COUNTIF($C$23:$K$23,"NONE")<>3,(COUNTIF($C$23:$K$23,$C$7)+COUNTIF($C$23:$K$23,$E$7)+COUNTIF($C$23:$K$23,$G$7)=3)) |
S21 | S21 | =AND(L4<L20,M4<M20) |
T21 | T21 | =AND(L5<L21,M5<M21) |
U21 | U21 | =AND(L6<L22,M6<M22) |
V21 | V21 | =AND(L7<L23,M7<M23) |
S22:V22 | S22 | =SUMIF(S10:S21,"True",$R$10:$R$21) |
I12 | I12 | =45+10 |
I13 | I13 | =20+1 |
K16 | K16 | =IF(I16<100,"Pass","Fail") |
C20:K32 | C20 | =INDEX(TblPAT,MATCH($B20,BlindIDs,0),MATCH(C$19,TblPAT[#Headers],0)) |
L20:L32 | L20 | =COUNTIFS(C20:K20,"<>NONE")-COUNT(C20:K20) |
M20:M32 | M20 | =COUNTIFS(C20,"<>"&"NONE",E20,0)+COUNTIFS(F20,"<>"&"NONE",H20,0)+COUNTIFS(I20,"<>"&"NONE",K20,0) |
B20:B23 | B20 | =B4 |
Named Ranges | ||
---|---|---|
Name | Refers To | Cells |
BlindIDs | =Catalogue!$B$3:$B$70 | C20:K32 |
Cells with Data Validation | ||
---|---|---|
Cell | Allow | Criteria |
C20:C32 | List | =TYPE |
B4:B7 | List | =BlindIDs |
C4:C7 | List | =TYPE |
D4:D7 | Whole number | between 0 and 100 |
E4:E7 | List | =TYPE |
F4:F7 | Whole number | between 0 and 100 |
G4:G7 | List | =TYPE |
H4:H7 | Whole number | between 0 and 100 |
B12:B15 | List | =BlindIDs |
C12:C15 | List | =TYPE |
D12:D15 | Whole number | between 0 and 100 |
E12:E15 | List | =TYPE |
F12:F15 | Whole number | between 0 and 100 |
G12:G15 | List | =TYPE |
H12:H15 | Whole number | between 0 and 100 |