MacMost Q&A Forum • View All Forum QuestionsAsk a Question

How Do I Use SUMIF With Logical Operators?

Trying to use the OR logical operator in SUMIF, for example
SUMIF(OR($H=”I0000″,$H=”I0001)”),$J)
—–
Tim Swaty

Comments: 2 Responses to “How Do I Use SUMIF With Logical Operators?”

    6 years ago

    That OR function doesn't work because the comparisons inside it are trying to compare an entire column to a single value. Is row H equal to "I0000"? No, because H is a row, not a cell and it can't be equal to a single value.

    One way to do what you want is to create another column. So make K2 the formula OR(H2="I0000",H2="I0001") and paste that throughout K to get TRUE and FALSE values in K. Then you can use SUMIF(K,true,J) as your formula. Then hide column K if you like.

    Tim
    6 years ago

    Thanks Gary. That makes sense to me.

Comments Closed.