Hi
Is there a way to sum one column only if the values in another column are populated?
So in the example below, there are 5 products: A - E in column A.
Column B states whether or not a product is 'Live'
And column C has the sales data for that product.
I'd like to sum up the sales of the products in column C only if there is a value in column B.
So the sum total would be 10 instead of 15.
Has anyone done this before? TIA
[TABLE="width: 202"]
<colgroup><col span="2"><col></colgroup><tbody>[TR]
[TD]Product [/TD]
[TD]Live? [/TD]
[TD]Sales[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Yes[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]Yes[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]Yes[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]Yes[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD] [/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]15[/TD]
[/TR]
</tbody>[/TABLE]
Is there a way to sum one column only if the values in another column are populated?
So in the example below, there are 5 products: A - E in column A.
Column B states whether or not a product is 'Live'
And column C has the sales data for that product.
I'd like to sum up the sales of the products in column C only if there is a value in column B.
So the sum total would be 10 instead of 15.
Has anyone done this before? TIA
[TABLE="width: 202"]
<colgroup><col span="2"><col></colgroup><tbody>[TR]
[TD]Product [/TD]
[TD]Live? [/TD]
[TD]Sales[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]Yes[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]Yes[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]Yes[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]D[/TD]
[TD]Yes[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD]E[/TD]
[TD] [/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD="align: right"]15[/TD]
[/TR]
</tbody>[/TABLE]