Long time listener, first time caller
I am trying to sum cells B1 - B5
but if the description of in cell A meet certain criteria I would like to exclude the corresponding number in cell B
Below I am able to remove references to RUN and BOX.
However if A cell description happens to have *BOTH* RUN & BOX in the description...it is double counting that reference.
=SUM(B1:B5)-SUM(SUMIF(A1:A5,{"*BOX*";"*RUN*"},B1:B5))
A | B
BOX 1
BOX and RUN 5
RUN 5
SHOOT 4
BOX and TROT 2
Total = 17
Removing Box & Run Desired = 17 -(1+5+5+2) = 4 (i.e. this is the result i want)
Removing Box & Run based on my formula = 17 - (1+5+5+5+2) = -1 (unfortunately this is the number i'm getting)
I suppose I need to use an OR argument of some sort or possibly a sumproduct.
thanks for your help.
I am trying to sum cells B1 - B5
but if the description of in cell A meet certain criteria I would like to exclude the corresponding number in cell B
Below I am able to remove references to RUN and BOX.
However if A cell description happens to have *BOTH* RUN & BOX in the description...it is double counting that reference.
=SUM(B1:B5)-SUM(SUMIF(A1:A5,{"*BOX*";"*RUN*"},B1:B5))
A | B
BOX 1
BOX and RUN 5
RUN 5
SHOOT 4
BOX and TROT 2
Total = 17
Removing Box & Run Desired = 17 -(1+5+5+2) = 4 (i.e. this is the result i want)
Removing Box & Run based on my formula = 17 - (1+5+5+5+2) = -1 (unfortunately this is the number i'm getting)
I suppose I need to use an OR argument of some sort or possibly a sumproduct.
thanks for your help.