=SUMPRODUCT(--(A2:A12="value"), C2:C12, D2:D12)
That double-hyphen phrase inserted into SUMPRODUCT() acts as a criteria match. 🤯
I'm entire unfamiliar with this technique and I'm hoping someone can shed some light on what it's called or where it's referenced.