D
D
Dmitry2018-10-18 23:48:13
excel
Dmitry, 2018-10-18 23:48:13

How to calculate the sum with a condition in Excel?

The line has three columns with data: A, B, C. There are no negative numbers.
How to display the sum A+B+C in column D, but only if the conditions (A+B)>15 and (A+B+C)>10 are met?
Everything written refers to one line, it is not necessary to summarize "from top to bottom".

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
x67, 2018-10-19
@x67


= If (or(a1+b1>15;a1+b1+c1>10);sum(a1:c1);"conditions are not met")

E
Eugene Kuznetsov, 2018-10-26
@KEugene

So we write:
=((A1+B1)>15)*((A1+B1+C1)>10)*(A1+B1+C1)
Multiplication plays the role of a logical AND: if the condition in brackets is met, then the value is 1 Accordingly, with calculated values ​​it will be 1 * 1 * (A1 + B1 + C1).
But don't you think that if there are no negative numbers there, then the second condition is redundant?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question