Google Spreadsheet - total of column if adjacent cell is true and minus another column
I have data like in the following table:
+---+-----+-----+
| A | B | C |
+---+-----+-----+
| 0 | 5 | 30 |
| 1 | 0 | 30 |
| 0 | 15 | 40 |
| 1 | 0 | 40 |
| 1 | 10 | 50 |
+---+-----+-----+
Column A is a flag (true = 1, false = 0) so we only add up rows with flag==1
Column B is a "tax" to remove from the amount in Column C
So basically here, the total would be 110:
(we don't count row 1)
30-0
(we don't count row 3)
40-0
50-10
How do I do it in Google Spreadsheet?
I have data like in the following table:
+---+-----+-----+
| A | B | C |
+---+-----+-----+
| 0 | 5 | 30 |
| 1 | 0 | 30 |
| 0 | 15 | 40 |
| 1 | 0 | 40 |
| 1 | 10 | 50 |
+---+-----+-----+
Column A is a flag (true = 1, false = 0) so we only add up rows with flag==1
Column B is a "tax" to remove from the amount in Column C
So basically here, the total would be 110:
(we don't count row 1)
30-0
(we don't count row 3)
40-0
50-10
How do I do it in Google Spreadsheet?
No comments:
Post a Comment