SUMPRODUCT(...)

Category: Math and trigonometry

Returns the sum of the products of corresponding array components

SUMPRODUCT(array1, [array2], [array3], ...)

Category: Information

Returns TRUE if the value is text

ISTEXT(value)

0

The formula verifies if the cell contains text, if yes then it multiplies the binary array with the corresponding cell value and then calculates the sum with SUMPRODUCT.