I tested the formulae from @mariosv and @JohnSUN above on the following table:

A B C
----------------
Z 1 3
Z 2 5
f 4 3
s 8 5
3 16 3

The results are as follows:

```
{=SUM((A1:A5="Z") * B1:B5 * C1:C5)} --> 13
=SUMPRODUCT(A1:A5="Z";B1:B5*C1:C5) --> 13
=SUMPRODUCT(A1:A5="Z";B1:B5;C1:C5) --> 13
```

Note: For those unfamiliar with Array Formulae (e.g. JohnSUN's formula above), please refer to the help document here. Specifically, you cannot copy and paste that formula as-is -- it will not be recognized. Here are the steps to use it:

- Copy "=SUM((A1:A5="Z") * B1:B5 * C1:C5)" and paste it into a cell.
- Instead of typing [Enter], type [Ctrl] + [Shift] + [Enter] to turn that into an Array function.
- The curly braces should appear around the function.