문제

I have a table:

a        1

b        2

c        3

and I want to use a SUMPRODUCT that will give me the total if the cell is a or b.

I have a cell that shows:

a/b

and I want to use either SUMIF or SUMPRODUCT to give me the total if it is a or b.

I wrote this:

=SUMPRODUCT(--(A2:A4=LEFT(A7,1)))

Do you think there is a way to use an OR within the SUMPRODUCT so that it can check for b within the table and give the total of that?

도움이 되었습니까?

해결책

In a SUMPRODUCT formula OR is +. AND is *

=SUMPRODUCT(--(A2:A4=LEFT(A7,1))+(A2:A4=LEFT(B7,1))
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top