The "plus sign" (+) is for OR in array formulas (and SUMPRODUCT).
=Sumproduct((A3:A159=B3:B159)*((D3:D159="Target A")+(D3:D159="Target B")))
With SUMPRODUCT, every comparison is evaluated to TRUE and FALSE. In Excel, TRUE can be represented by any non-zero number, while FALSE is equivalent to 0. If D3="Target A", the first element of that array will be 1 (True=1). That means that D3 cannot be Target B and that element of the that array will be 0. When you add them together, it will be 1, and so will be counted as TRUE.
It can be tough to get your head around how arrays work in formulas. Try reading this.
Answer from dkusleika on Stack ExchangeCan somebody clever please help me with a formula for the below, or let me know if there is a better way to set this up.
In cell E5, I would like to do a =SUMPRODUCT formula for columns D and E, but only when column F = F5.
Thank you!
Adding a IF to a SUMIF and SUMProduct formula
SUMPRODUCT or product within SUMIF with multiple criterion and IF statements.
excel - SUMPRODUCT function with IF logic - Stack Overflow
Sumproduct + IF or and
The "plus sign" (+) is for OR in array formulas (and SUMPRODUCT).
=Sumproduct((A3:A159=B3:B159)*((D3:D159="Target A")+(D3:D159="Target B")))
With SUMPRODUCT, every comparison is evaluated to TRUE and FALSE. In Excel, TRUE can be represented by any non-zero number, while FALSE is equivalent to 0. If D3="Target A", the first element of that array will be 1 (True=1). That means that D3 cannot be Target B and that element of the that array will be 0. When you add them together, it will be 1, and so will be counted as TRUE.
It can be tough to get your head around how arrays work in formulas. Try reading this.
There is an OR function in Excel: OR(logical1, [logical2], [logical3], ...)
This example will be TRUE if either C1 OR B1 contain values greater than 100 or FALSE if they both don't:
=OR(B1>100,C1>100)
I'm not 100% sure how you want to apply this, but I'm sure this can help.
This is the same as Variatus's post except it avoids the, in my opinion, odd choice to multiply the parameters inside the sumproduct function, which handles the multiplication. I've also explicitly converted the first logical array to number.
=SUMPRODUCT(N(F2:F5>=243),E2:E5,F2:F5)
You're almost there. Just add the first array to your formula another time,
=SUMPRODUCT((F2:F5>=243)*(E2:E5)*(F2:F5))
(F2:F5>=243) creates an array of 1 or 0, and the result of that must be multiplied with (F2:F5).