EXCEL v 2016
I have 3 cells with % failure types (the three add up to 100%). The client asked for formatting of
CxxBxxAxx
where xx is 2 (or 3 if 100%) digit % for that failure type
If no failure is recorded, all 3 cells have '*' in them and need to be reported as '*'
0 needs to be reported as 00
Each % is rounded to nearest 10%
The formula I have is
=IF(Reporting!C48="*","*","C"&IF(Reporting!C50=0,"00",Reporting!C50)&"B"&IF(Reporting!C49=0,"00",Reporting!C49)&"A"&IF(Reporting!C48=0,"00",Reporting!C48))
It works fine, but the issue is I have 4 columns (4 samples) of 8 tests per sample. If I copy the formula, it doesn't fill correctly. I don't want to write each cell if I can avoid it. By dragging the cell handle, I get this in the next row
=IF(Reporting!C49="*","*","C"&IF(Reporting!C51=0,"00",Reporting!C51)&"B"&IF(Reporting!C50=0,"00",Reporting!C50)&"A"&IF(Reporting!C49=0,"00",Reporting!C49))
Data is in Reporting!C48:Reporting!F71. Each column is the % failures for 8 tests each of 4 samples.
Where I'm working
Data Set
I have 3 cells with % failure types (the three add up to 100%). The client asked for formatting of
CxxBxxAxx
where xx is 2 (or 3 if 100%) digit % for that failure type
If no failure is recorded, all 3 cells have '*' in them and need to be reported as '*'
0 needs to be reported as 00
Each % is rounded to nearest 10%
The formula I have is
=IF(Reporting!C48="*","*","C"&IF(Reporting!C50=0,"00",Reporting!C50)&"B"&IF(Reporting!C49=0,"00",Reporting!C49)&"A"&IF(Reporting!C48=0,"00",Reporting!C48))
It works fine, but the issue is I have 4 columns (4 samples) of 8 tests per sample. If I copy the formula, it doesn't fill correctly. I don't want to write each cell if I can avoid it. By dragging the cell handle, I get this in the next row
=IF(Reporting!C49="*","*","C"&IF(Reporting!C51=0,"00",Reporting!C51)&"B"&IF(Reporting!C50=0,"00",Reporting!C50)&"A"&IF(Reporting!C49=0,"00",Reporting!C49))
Data is in Reporting!C48:Reporting!F71. Each column is the % failures for 8 tests each of 4 samples.
Where I'm working
MrExcelSample.xlsx | |||
---|---|---|---|
E | |||
8 | % | ||
9 | C100B00A00 | ||
10 | C00B100A00 | ||
11 | C00B00A100 | ||
12 | C100B00A00 | ||
13 | C00B100A00 | ||
14 | C00B00A100 | ||
15 | C100B00A00 | ||
16 | C00B100A00 | ||
PDF |
Cell Formulas | ||
---|---|---|
Range | Formula | |
E9:E16 | E9 | =IF(Reporting!C48="*","*","C"&IF(Reporting!C50=0,"00",Reporting!C50)&"B"&IF(Reporting!C49=0,"00",Reporting!C49)&"A"&IF(Reporting!C48=0,"00",Reporting!C48)) |
Data Set
MrExcelSample.xlsx | ||||||
---|---|---|---|---|---|---|
C | D | E | F | |||
48 | 0 | 0 | 100 | 40 | ||
49 | 0 | 0 | 0 | 40 | ||
50 | 100 | 100 | 0 | 20 | ||
51 | 0 | * | 0 | 0 | ||
52 | 0 | * | 0 | 0 | ||
53 | 100 | * | 100 | 100 | ||
54 | 0 | 0 | * | * | ||
55 | 0 | 0 | * | * | ||
56 | 100 | 100 | * | * | ||
57 | 0 | 0 | 100 | 25 | ||
58 | 0 | 0 | 0 | 25 | ||
59 | 100 | 100 | 0 | 50 | ||
60 | 0 | * | 0 | 30 | ||
61 | 0 | * | 0 | 30 | ||
62 | 100 | * | 100 | 40 | ||
63 | 10 | * | 0 | 0 | ||
64 | 0 | * | 0 | 0 | ||
65 | 90 | * | 100 | 100 | ||
66 | 15 | * | 50 | 10 | ||
67 | 0 | * | 0 | 10 | ||
68 | 85 | * | 50 | 80 | ||
69 | 20 | 15 | 20 | 20 | ||
70 | 0 | 0 | 20 | 0 | ||
71 | 80 | 85 | 60 | 80 | ||
Reporting |
Cell Formulas | ||
---|---|---|
Range | Formula | |
C48 | C48 | =VLOOKUP($A$2,Adhesion!$A:$ED,5,FALSE) |
D48 | D48 | =VLOOKUP($A$2,Adhesion!$A:$ED,38,FALSE) |
E48 | E48 | =VLOOKUP($A$2,Adhesion!$A:$ED,71,FALSE) |
F48 | F48 | =VLOOKUP($A$2,Adhesion!$A:$ED,104,FALSE) |
C49 | C49 | =VLOOKUP($A$2,Adhesion!$A:$ED,6,FALSE) |
D49 | D49 | =VLOOKUP($A$2,Adhesion!$A:$ED,39,FALSE) |
E49 | E49 | =VLOOKUP($A$2,Adhesion!$A:$ED,72,FALSE) |
F49 | F49 | =VLOOKUP($A$2,Adhesion!$A:$ED,105,FALSE) |
C50 | C50 | =VLOOKUP($A$2,Adhesion!$A:$ED,7,FALSE) |
D50 | D50 | =VLOOKUP($A$2,Adhesion!$A:$ED,40,FALSE) |
E50 | E50 | =VLOOKUP($A$2,Adhesion!$A:$ED,73,FALSE) |
F50 | F50 | =VLOOKUP($A$2,Adhesion!$A:$ED,106,FALSE) |
C51 | C51 | =VLOOKUP($A$2,Adhesion!$A:$ED,9,FALSE) |
D51 | D51 | =VLOOKUP($A$2,Adhesion!$A:$ED,42,FALSE) |
E51 | E51 | =VLOOKUP($A$2,Adhesion!$A:$ED,75,FALSE) |
F51 | F51 | =VLOOKUP($A$2,Adhesion!$A:$ED,108,FALSE) |
C52 | C52 | =VLOOKUP($A$2,Adhesion!$A:$ED,10,FALSE) |
D52 | D52 | =VLOOKUP($A$2,Adhesion!$A:$ED,43,FALSE) |
E52 | E52 | =VLOOKUP($A$2,Adhesion!$A:$ED,76,FALSE) |
F52 | F52 | =VLOOKUP($A$2,Adhesion!$A:$ED,109,FALSE) |
C53 | C53 | =VLOOKUP($A$2,Adhesion!$A:$ED,11,FALSE) |
D53 | D53 | =VLOOKUP($A$2,Adhesion!$A:$ED,44,FALSE) |
E53 | E53 | =VLOOKUP($A$2,Adhesion!$A:$ED,77,FALSE) |
F53 | F53 | =VLOOKUP($A$2,Adhesion!$A:$ED,110,FALSE) |
C54 | C54 | =VLOOKUP($A$2,Adhesion!$A:$ED,13,FALSE) |
D54 | D54 | =VLOOKUP($A$2,Adhesion!$A:$ED,46,FALSE) |
E54 | E54 | =VLOOKUP($A$2,Adhesion!$A:$ED,79,FALSE) |
F54 | F54 | =VLOOKUP($A$2,Adhesion!$A:$ED,112,FALSE) |
C55 | C55 | =VLOOKUP($A$2,Adhesion!$A:$ED,14,FALSE) |
D55 | D55 | =VLOOKUP($A$2,Adhesion!$A:$ED,47,FALSE) |
E55 | E55 | =VLOOKUP($A$2,Adhesion!$A:$ED,80,FALSE) |
F55 | F55 | =VLOOKUP($A$2,Adhesion!$A:$ED,113,FALSE) |
C56 | C56 | =VLOOKUP($A$2,Adhesion!$A:$ED,15,FALSE) |
D56 | D56 | =VLOOKUP($A$2,Adhesion!$A:$ED,48,FALSE) |
E56 | E56 | =VLOOKUP($A$2,Adhesion!$A:$ED,81,FALSE) |
F56 | F56 | =VLOOKUP($A$2,Adhesion!$A:$ED,114,FALSE) |
C57 | C57 | =VLOOKUP($A$2,Adhesion!$A:$ED,17,FALSE) |
D57 | D57 | =VLOOKUP($A$2,Adhesion!$A:$ED,50,FALSE) |
E57 | E57 | =VLOOKUP($A$2,Adhesion!$A:$ED,83,FALSE) |
F57 | F57 | =VLOOKUP($A$2,Adhesion!$A:$ED,116,FALSE) |
C58 | C58 | =VLOOKUP($A$2,Adhesion!$A:$ED,18,FALSE) |
D58 | D58 | =VLOOKUP($A$2,Adhesion!$A:$ED,51,FALSE) |
E58 | E58 | =VLOOKUP($A$2,Adhesion!$A:$ED,84,FALSE) |
F58 | F58 | =VLOOKUP($A$2,Adhesion!$A:$ED,117,FALSE) |
C59 | C59 | =VLOOKUP($A$2,Adhesion!$A:$ED,19,FALSE) |
D59 | D59 | =VLOOKUP($A$2,Adhesion!$A:$ED,52,FALSE) |
E59 | E59 | =VLOOKUP($A$2,Adhesion!$A:$ED,85,FALSE) |
F59 | F59 | =VLOOKUP($A$2,Adhesion!$A:$ED,118,FALSE) |
C60 | C60 | =VLOOKUP($A$2,Adhesion!$A:$ED,21,FALSE) |
D60 | D60 | =VLOOKUP($A$2,Adhesion!$A:$ED,54,FALSE) |
E60 | E60 | =VLOOKUP($A$2,Adhesion!$A:$ED,87,FALSE) |
F60 | F60 | =VLOOKUP($A$2,Adhesion!$A:$ED,120,FALSE) |
C61 | C61 | =VLOOKUP($A$2,Adhesion!$A:$ED,22,FALSE) |
D61 | D61 | =VLOOKUP($A$2,Adhesion!$A:$ED,55,FALSE) |
E61 | E61 | =VLOOKUP($A$2,Adhesion!$A:$ED,88,FALSE) |
F61 | F61 | =VLOOKUP($A$2,Adhesion!$A:$ED,121,FALSE) |
C62 | C62 | =VLOOKUP($A$2,Adhesion!$A:$ED,23,FALSE) |
D62 | D62 | =VLOOKUP($A$2,Adhesion!$A:$ED,56,FALSE) |
E62 | E62 | =VLOOKUP($A$2,Adhesion!$A:$ED,89,FALSE) |
F62 | F62 | =VLOOKUP($A$2,Adhesion!$A:$ED,122,FALSE) |
C63 | C63 | =VLOOKUP($A$2,Adhesion!$A:$ED,25,FALSE) |
D63 | D63 | =VLOOKUP($A$2,Adhesion!$A:$ED,58,FALSE) |
E63 | E63 | =VLOOKUP($A$2,Adhesion!$A:$ED,91,FALSE) |
F63 | F63 | =VLOOKUP($A$2,Adhesion!$A:$ED,124,FALSE) |
C64 | C64 | =VLOOKUP($A$2,Adhesion!$A:$ED,26,FALSE) |
D64 | D64 | =VLOOKUP($A$2,Adhesion!$A:$ED,59,FALSE) |
E64 | E64 | =VLOOKUP($A$2,Adhesion!$A:$ED,92,FALSE) |
F64 | F64 | =VLOOKUP($A$2,Adhesion!$A:$ED,125,FALSE) |
C65 | C65 | =VLOOKUP($A$2,Adhesion!$A:$ED,27,FALSE) |
D65 | D65 | =VLOOKUP($A$2,Adhesion!$A:$ED,60,FALSE) |
E65 | E65 | =VLOOKUP($A$2,Adhesion!$A:$ED,93,FALSE) |
F65 | F65 | =VLOOKUP($A$2,Adhesion!$A:$ED,126,FALSE) |
C66 | C66 | =VLOOKUP($A$2,Adhesion!$A:$ED,29,FALSE) |
D66 | D66 | =VLOOKUP($A$2,Adhesion!$A:$ED,62,FALSE) |
E66 | E66 | =VLOOKUP($A$2,Adhesion!$A:$ED,95,FALSE) |
F66 | F66 | =VLOOKUP($A$2,Adhesion!$A:$ED,128,FALSE) |
C67 | C67 | =VLOOKUP($A$2,Adhesion!$A:$ED,30,FALSE) |
D67 | D67 | =VLOOKUP($A$2,Adhesion!$A:$ED,63,FALSE) |
E67 | E67 | =VLOOKUP($A$2,Adhesion!$A:$ED,96,FALSE) |
F67 | F67 | =VLOOKUP($A$2,Adhesion!$A:$ED,129,FALSE) |
C68 | C68 | =VLOOKUP($A$2,Adhesion!$A:$ED,31,FALSE) |
D68 | D68 | =VLOOKUP($A$2,Adhesion!$A:$ED,64,FALSE) |
E68 | E68 | =VLOOKUP($A$2,Adhesion!$A:$ED,97,FALSE) |
F68 | F68 | =VLOOKUP($A$2,Adhesion!$A:$ED,130,FALSE) |
C69 | C69 | =VLOOKUP($A$2,Adhesion!$A:$ED,33,FALSE) |
D69 | D69 | =VLOOKUP($A$2,Adhesion!$A:$ED,66,FALSE) |
E69 | E69 | =VLOOKUP($A$2,Adhesion!$A:$ED,99,FALSE) |
F69 | F69 | =VLOOKUP($A$2,Adhesion!$A:$ED,132,FALSE) |
C70 | C70 | =VLOOKUP($A$2,Adhesion!$A:$ED,34,FALSE) |
D70 | D70 | =VLOOKUP($A$2,Adhesion!$A:$ED,67,FALSE) |
E70 | E70 | =VLOOKUP($A$2,Adhesion!$A:$ED,100,FALSE) |
F70 | F70 | =VLOOKUP($A$2,Adhesion!$A:$ED,133,FALSE) |
C71 | C71 | =VLOOKUP($A$2,Adhesion!$A:$ED,35,FALSE) |
D71 | D71 | =VLOOKUP($A$2,Adhesion!$A:$ED,68,FALSE) |
E71 | E71 | =VLOOKUP($A$2,Adhesion!$A:$ED,101,FALSE) |
F71 | F71 | =VLOOKUP($A$2,Adhesion!$A:$ED,134,FALSE) |
Cells with Conditional Formatting | ||||
---|---|---|---|---|
Cell | Condition | Cell Format | Stop If True | |
F69 | Expression | =(F69+F70+F71)<>100 | text | NO |
F66 | Expression | =(F66+F67+F68)<>100 | text | NO |
F63 | Expression | =(F63+F64+F65)<>100 | text | NO |
F60 | Expression | =(F60+F61+F62)<>100 | text | NO |
F57 | Expression | =(F57+F58+F59)<>100 | text | NO |
F54 | Expression | =(F54+F55+F56)<>100 | text | NO |
F51 | Expression | =(F51+F52+F53)<>100 | text | NO |
E69 | Expression | =(E69+E70+E71)<>100 | text | NO |
E66 | Expression | =(E66+E67+E68)<>100 | text | NO |
E63 | Expression | =(E63+E64+E65)<>100 | text | NO |
E60 | Expression | =(E60+E61+E62)<>100 | text | NO |
E57 | Expression | =(E57+E58+E59)<>100 | text | NO |
E54 | Expression | =(E54+E55+E56)<>100 | text | NO |
E51 | Expression | =(E51+E52+E53)<>100 | text | NO |
D69 | Expression | =(D69+D70+D71)<>100 | text | NO |
D66 | Expression | =(D66+D67+D68)<>100 | text | NO |
D63 | Expression | =(D63+D64+D65)<>100 | text | NO |
D60 | Expression | =(D60+D61+D62)<>100 | text | NO |
D57 | Expression | =(D57+D58+D59)<>100 | text | NO |
D54 | Expression | =(D54+D55+D56)<>100 | text | NO |
D51 | Expression | =(D51+D52+D53)<>100 | text | NO |
C69 | Expression | =(C69+C70+C71)<>100 | text | NO |
C66 | Expression | =(C66+C67+C68)<>100 | text | NO |
C63 | Expression | =(C63+C64+C65)<>100 | text | NO |
C60 | Expression | =(C60+C61+C62)<>100 | text | NO |
C57 | Expression | =(C57+C58+C59)<>100 | text | NO |
C54 | Expression | =(C54+C55+C56)<>100 | text | NO |
C51 | Expression | =(C51+C52+C53)<>100 | text | NO |
F48 | Expression | =(F48+F49+F50)<>100 | text | NO |
E48 | Expression | =(E48+E49+E50)<>100 | text | NO |
D48 | Expression | =(D48+D49+D50)<>100 | text | NO |
C48 | Expression | =(C48+C49+C50)<>100 | text | NO |
Last edited: