Hi everyone,
Understand my problem can be complex. Allow me to explain in detail.
If you refer to my excel file, there were a number of different types of (MI) Measuring Instrument types (TPG, PG, CMM SRT etc)
Using my current existing array formula in cell F111:F145:
=IFERROR(IF(ROWS($1:1)<=COUNTIF($F$8:$F$108,"PG"),"PG",IF(ROWS($1:1)<=COUNTIF($F$8:$F$108,"PG")+COUNTIF($F$8:$F$108,"TPG"),"TPG",IF(ROWS($1:1)<=COUNTIF($F$8:$F$108,"TPG")+COUNTIF($F$8:$F$108,"TRG"),"TRG",IF(ROWS($1:1)<=COUNTIF($F$8:$F$108,"TPG")+COUNTIF($F$8:$F$108,"TRG")+COUNTIF($F$8:$F$108,"RG"),"RG",IF(ROWS($1:1)<=COUNTIF($F$8:$F$108,"PG")+COUNTIF($F$8:$F$108,"TPG")+COUNTIF($F$8:$F$108,"TRG")+COUNTIF($F$8:$F$108,"RG")+COUNTIF($F$8:$F$108,"GB"),"GB",INDEX($F$8:$F$108,MATCH(0,COUNTIF($F$110:F110,IF($F$8:$F$108="","",IF($F$8:$F$108="VI","",IF($F$8:$F$108="NOTE","",IF($F$8:$F$108="-","",$F$8:$F$108))))),0))))))),"")
together with my current formula in cell B111:B145:
=IF(F111="","",IF(AND(F111<>"PG",F111<>"TPG",F111<>"RG",F111<>"TRG",F111<>"GB"),INDIRECT(ADDRESS(AGGREGATE(15,6,ROW($Q$9:$W$18)/($Q$9:$W$18=F111),1),AGGREGATE(15,6,COLUMN($R$9:$X$18)/($Q$9:$W$18=F111),1))),IF(INDEX(B$1:B$109,AGGREGATE(15,6,ROW($F$8:$F$108)/($F$8:$F$108=$F111),COUNTIF($F$110:$F111,$F111)))<>"",INDEX(B$1:B$109,AGGREGATE(15,6,ROW($F$8:$F$108)/($F$8:$F$108=$F111),COUNTIF($F$110:$F111,$F111))),"")))
also in cell D&E111:145
=IF(OR($F111="TPG",$F111="PG",$F111="TRG",$F111="RG",$F111="GB"),IF(INDEX(D$1:D$108,AGGREGATE(15,6,ROW($F$8:$F$108)/($F$8:$F$108=$F111),COUNTIF($F$110:$F111,$F111)))<>"",INDEX(D$1:D$108,AGGREGATE(15,6,ROW($F$8:$F$108)/($F$8:$F$108=$F111),COUNTIF($F$110:$F111,$F111))),""),IF(ISBLANK($F111),"-",""))
I am able to achieve the following:
1) Items will either TPG, PG, TRG, RG, GB as their MI type, will appear "n" times, depending on the number of times, "n", it appears in the upper section
2) Items with other types of MI will only repeat once
3) Items with VI and NOTE type of MI will not appear at all
I am hoping to modify my existing formula such that i am also able to achieve:
a) item with "ID" indicated under the L/N cell A8:A108, will not appear, regardless of MI type. This condition is similar to the above 3) scenario. (Please refer to the cell in yellow in the attached workbook), although its MI type is PG.
Based on the current formula limitation, it will appear under section "MEASURING INSTRUMENT USED"
b) Similar items which appear more than once under cell B, D and E (E.g 4-40 UNC(4X)) will only appear once under the MEASURING INSTRUMENT USED section, regardless of MI type. This condition is similar to 2)
(Please refer to cell in blue in the attached workbook), although its MI type is TPG.
Based on the current formula, it will appear 4 times under section "MEASURING INSTRUMENT USED", similarly to the number of times I have added in the upper section.
To conclude, i hope my formula can be further modified, so I can also achieve both a) and b), together with 1),2) and 3) conditions.
Much appreciated.
Jude
Understand my problem can be complex. Allow me to explain in detail.
If you refer to my excel file, there were a number of different types of (MI) Measuring Instrument types (TPG, PG, CMM SRT etc)
Using my current existing array formula in cell F111:F145:
=IFERROR(IF(ROWS($1:1)<=COUNTIF($F$8:$F$108,"PG"),"PG",IF(ROWS($1:1)<=COUNTIF($F$8:$F$108,"PG")+COUNTIF($F$8:$F$108,"TPG"),"TPG",IF(ROWS($1:1)<=COUNTIF($F$8:$F$108,"TPG")+COUNTIF($F$8:$F$108,"TRG"),"TRG",IF(ROWS($1:1)<=COUNTIF($F$8:$F$108,"TPG")+COUNTIF($F$8:$F$108,"TRG")+COUNTIF($F$8:$F$108,"RG"),"RG",IF(ROWS($1:1)<=COUNTIF($F$8:$F$108,"PG")+COUNTIF($F$8:$F$108,"TPG")+COUNTIF($F$8:$F$108,"TRG")+COUNTIF($F$8:$F$108,"RG")+COUNTIF($F$8:$F$108,"GB"),"GB",INDEX($F$8:$F$108,MATCH(0,COUNTIF($F$110:F110,IF($F$8:$F$108="","",IF($F$8:$F$108="VI","",IF($F$8:$F$108="NOTE","",IF($F$8:$F$108="-","",$F$8:$F$108))))),0))))))),"")
together with my current formula in cell B111:B145:
=IF(F111="","",IF(AND(F111<>"PG",F111<>"TPG",F111<>"RG",F111<>"TRG",F111<>"GB"),INDIRECT(ADDRESS(AGGREGATE(15,6,ROW($Q$9:$W$18)/($Q$9:$W$18=F111),1),AGGREGATE(15,6,COLUMN($R$9:$X$18)/($Q$9:$W$18=F111),1))),IF(INDEX(B$1:B$109,AGGREGATE(15,6,ROW($F$8:$F$108)/($F$8:$F$108=$F111),COUNTIF($F$110:$F111,$F111)))<>"",INDEX(B$1:B$109,AGGREGATE(15,6,ROW($F$8:$F$108)/($F$8:$F$108=$F111),COUNTIF($F$110:$F111,$F111))),"")))
also in cell D&E111:145
=IF(OR($F111="TPG",$F111="PG",$F111="TRG",$F111="RG",$F111="GB"),IF(INDEX(D$1:D$108,AGGREGATE(15,6,ROW($F$8:$F$108)/($F$8:$F$108=$F111),COUNTIF($F$110:$F111,$F111)))<>"",INDEX(D$1:D$108,AGGREGATE(15,6,ROW($F$8:$F$108)/($F$8:$F$108=$F111),COUNTIF($F$110:$F111,$F111))),""),IF(ISBLANK($F111),"-",""))
I am able to achieve the following:
1) Items will either TPG, PG, TRG, RG, GB as their MI type, will appear "n" times, depending on the number of times, "n", it appears in the upper section
2) Items with other types of MI will only repeat once
3) Items with VI and NOTE type of MI will not appear at all
I am hoping to modify my existing formula such that i am also able to achieve:
a) item with "ID" indicated under the L/N cell A8:A108, will not appear, regardless of MI type. This condition is similar to the above 3) scenario. (Please refer to the cell in yellow in the attached workbook), although its MI type is PG.
Based on the current formula limitation, it will appear under section "MEASURING INSTRUMENT USED"
b) Similar items which appear more than once under cell B, D and E (E.g 4-40 UNC(4X)) will only appear once under the MEASURING INSTRUMENT USED section, regardless of MI type. This condition is similar to 2)
(Please refer to cell in blue in the attached workbook), although its MI type is TPG.
Based on the current formula, it will appear 4 times under section "MEASURING INSTRUMENT USED", similarly to the number of times I have added in the upper section.
To conclude, i hope my formula can be further modified, so I can also achieve both a) and b), together with 1),2) and 3) conditions.
Much appreciated.
Jude