Alright, so I ran into a few issues with the formula.
First is that the "B2:B10=Sheet2!A2" section doesn't work in my case as one cell is Text and the other is General. My two options is switching that to a SEARCH (which I tested and works fine) or setting my macro (which this formula is going into) to just reformat the column before running the formula. Not much of an issue but just mentioning it.
Second is that the "A2:A10=55555" formula doesn't work. It needs to be dynamic and search for ANY duplicate values, not just those matching 55555.
Speaking of which, I see you mention not to reference entire columns (probably due to performance reasons). The problem is the worksheet this formula will be applied to is dynamic (raw data is pulled from another source and pasted into this worksheet daily). So column reference are needed.
Keep in mind that if this can be better accomplished (easier or better performance) by using helper columns or VBA code I'm fine with that. I just wasn't sure if there was a simple tweak to the formula that could accomplish what I was looking for.
[TABLE="class: grid"]
<tbody>[TR]
[TD]Row\Col[/TD]
[TD]A
[/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]F
[/TD]
[TD]G
[/TD]
[TD]H
[/TD]
[TD]I
[/TD]
[TD]J
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Key[/TD]
[TD]TypeA[/TD]
[TD]TypeB[/TD]
[TD]TypeC[/TD]
[TD]Quantity[/TD]
[TD]Code[/TD]
[TD][/TD]
[TD][/TD]
[TD]Z10 Type A Code A[/TD]
[TD]=SUM(SUMIFS(E:E,B:B,Sheet2!A2,F:F,"*A*"),SUMIFS(E:E,C:C,Sheet2!A2,F:F,"*B*"),SUMIFS(E:E,D:D,Sheet2!A2,F:F,"*C*"))
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]55553
[/TD]
[TD]Z15[/TD]
[TD]Z17[/TD]
[TD]Z19[/TD]
[TD]1.000
[/TD]
[TD]B[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]55554
[/TD]
[TD]Z10[/TD]
[TD]Z12[/TD]
[TD]Z14[/TD]
[TD]1.000
[/TD]
[TD]A[/TD]
[TD]+1 A[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]55555
[/TD]
[TD]Z10[/TD]
[TD]Z12[/TD]
[TD]Z14[/TD]
[TD]1.000
[/TD]
[TD]A/B[/TD]
[TD]+1 A[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]5
[/TD]
[TD]55555
[/TD]
[TD]Z10[/TD]
[TD]Z12[/TD]
[TD]Z14[/TD]
[TD]1.000
[/TD]
[TD]A[/TD]
[TD]Duplicate A[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6
[/TD]
[TD]55555
[/TD]
[TD]Z10[/TD]
[TD]Z12[/TD]
[TD]Z14[/TD]
[TD]1.000
[/TD]
[TD]A/C[/TD]
[TD]Duplicate A[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]55556
[/TD]
[TD]Z05[/TD]
[TD]Z07[/TD]
[TD]Z09[/TD]
[TD]1.000
[/TD]
[TD]C[/TD]
[TD]Only want each Code to count once per Key. So Code "A" for Key "55555" should return 2 in this example.[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]cerfani's Formula[/TD]
[TD]{=IFERROR(SUM(IF((B:B=Sheet2!A2)*(IFERROR(SEARCH("A",F:F),0)>0)*(A:A=55555),E:E,0))/SUM((B:B=Sheet2!A2)*(IFERROR(SEARCH("A",F:F),0)>0)*(A:A=55555)),0)}
[/TD]
[/TR]
[TR]
[TD]9
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]My Attempt[/TD]
[TD]{=IFERROR(SUM(IF((IFERROR(SEARCH(Sheet2!A2,B:B),0)>0)*(IFERROR(SEARCH("A",F:F),0)>0)*(A:A=A:A),E:E,0))/SUM((IFERROR(SEARCH(Sheet2!A2,B:B),0)>0)*(IFERROR(SEARCH("A",F:F),0)>0)*(A:A=A:A)),0)}
[/TD]
[/TR]
</tbody>[/TABLE]