简体   繁体   中英

EXCEL Formula: Multiply SUMIFS outcome with the corresponding row value from a different column

I am trying to use SUMIFS and multiply its output with the a values from the corresponding row. Example:

Example

In This example I will use just 1 criteria for the SUMIFS, but the concept remains the same: SUMIFS(C2:C5; B2:B5; "=Sum"). This would return 5 + 6 = 11 Now I want to multiple that by the corresponding probability. Meaning 5 * 50% + 6 * 20%: SUMIFS(C2:C5; B2:B5; "=Sum") *

Any idea how to include the probability in the equation?

Thanks!

You can't use SUMIFS for this unless you add a helper column - try using SUMPRODUCT instead

=SUMPRODUCT((B2:B5="Sum")+0;C2:C5;D2:D5)

SUMPRODUCT multiplies all the arrays/ranges and then sums the result, so we can include your value and probability ranges with a conditional array based on "Sum" in the include range

With a helper column you can just use column E to multiply C and D , eg this formula in E2 copied down

=C2*D2

and then use SUMIFS like this

=SUMIFS(E2:E5;B2:B5;"Sum")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM