TIL: Conditional sum product in Google Sheets

=SUMPRODUCT(D5:D1009="",C5:C1009,B5:B1009)

Just learnt an easy way to do conditional SumProduct1 calculations in Google Sheets2.

In above example, I wanted the SumProduct of values in columns B and C, when the respective cell in column D was empty.

The solution is to simply introduce the conditional column as another input, with the condition stated in the input.

Sheets does the SumProduct calculations, with each true as 1, and false as 0, thus making it a Conditional SumProduct :)

Continue reading TIL: Conditional sum product in Google Sheets