Conditional sum if

Mr2017

Well-known Member
Joined
Nov 28, 2016
Messages
644
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
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

Product Live? Sales
AYes1
BYes2
CYes3
DYes4
E 5
15

<colgroup><col span="2"><col></colgroup><tbody>
</tbody>
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
I'm assuming that B may not always be blank or Yes? "Not blank" can be tricky in a SUMIF, so sum all and deduct the blanks:
=SUM(C1:C5)-SUMIF(B1:B5,"",C1:C5)
 
Last edited:
Upvote 0
Ok, thanks everyone.

The methods were useful!
 
Upvote 0

Forum statistics

Threads
1,213,557
Messages
6,114,288
Members
448,563
Latest member
MushtaqAli

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top