The only way I can currently think of is through the use of a helper column. Others may have better suggestions/answers.
This solution uses a helper column. You can set it up so that your PRODUCT result is either the first entry or the last entry.
Solution at the top of the list.
1) In the first cell use the following formula:
Basically if the check is there the cell C3 is true and the value from B3 is used. if it is false you do not want it affecting your results, so you use 1 instead.
2) In the next cell use the following formula and copy down as required:
D3 in this case if the address of your first cell where you placed the formula from step 1). You will multiply the value from the previous cell, by the value for the current row or 1 based on the value in C4. The last cell in the copied list will have the product you are looking for.
Alternatively if you are going the other direction, place the first formula in the last cell in the column. Place the second formula in the second last cell in the column and adjust the references then copy the formula up. The top cell in the column will then have your product.