I have an formula i did two different ways that ads up amounts in a column an item in an array matches an item in the match column.

array formula
{=SUM(IF( ( {"2","b3","a23","3"}=TEXT(C11:C19,"#") ),D11:D19, 0))}

standard sumproduct
=SUMPRODUCT(({"2","b3","a23","3"}=TEXT($C$12:$C$19,"#"))*--($D$12:$D$19))

However I would like to take the array part {"2","b3","a23","3"} out and reference the array as a value in a cell B2. So that Cell B2 had either {"2","b3","a23","3"} or "2","b3","a23","3"


=SUM(IF( ( INDEX( B2,0,0)=TEXT(C11:C19,"#") ),D11:D19, 0))
=SUMPRODUCT((INDEX(B2,0,0) =TEXT($C$12:$C$19,"#"))*--($D$12:$D$19))

However those formulas don't work.

I have successfully used the index function in the past, but this did not work. Using the Evaluate Formula option I see it added Extra quotes around every item including the braces "{" and "}". Index by itself does not add the extra quotes.

Is there a trick as I want to use variations of this formula several times and want just one array reference.

any an all thoughts are appreciated.

thanks

Alan