Forum 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?”

    5/29/18 @ 9:20 am

    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
    5/29/18 @ 12:16 pm

    Thanks Gary. That makes sense to me.

Leave a New Comment Related to "How Do I Use SUMIF With Logical Operators?"

:

:

:


0/500 (500 character limit -- please state your comment succinctly and do not try to get around this limit by posting two comments)