I suspect:
=SUM(A4:A7)-SUMIF(B4:B7,"X",A4:A7)
is what you are after, or perhaps:
=SUM(A4:A7)-2*SUMIF(B4:B7,"X",A4:A7)
but a better solution is from @barry houdini:
in B9 try this formula copied to C9
=SUMIF(B4:B7,"<>X",$A4:$A7)
Pergunta
I have a column of values, and then I have two columns with simple marking like just an 'X':
A B C
1
2
3 VALUES: PERSON1: PERSON2
4 500 X
5 180 X
6 100 X
7 200 X
8 TOTAL:
9 =SUM(A4:A8) ?? ??
Can I create a statement that will check that if a box has an X
in it the value of the A-column cell on the same row will be subtracted from the total summation?
In the example above PERSON2 should have a statement with the values '=980-180-100' which is 700
.
I can easily do it for one cell: =IF(B4="X", A9-A4)
but I can't quite get around with doing with multiple.
Solução
I suspect:
=SUM(A4:A7)-SUMIF(B4:B7,"X",A4:A7)
is what you are after, or perhaps:
=SUM(A4:A7)-2*SUMIF(B4:B7,"X",A4:A7)
but a better solution is from @barry houdini:
in B9 try this formula copied to C9
=SUMIF(B4:B7,"<>X",$A4:$A7)
Outras dicas
You can use something like
=$A9-SUMIFS($A4:$A7,B4:B7,"X")