Row dependent sumif

Mr2017

Well-known Member
Joined
Nov 28, 2016
Messages
644
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi

I'd like to create a formula that sums up data in one column only if a condition of data in another column is met.

In the example below, the values in cells A2:A4 are 1, 0, and 1, respectively.
In cells B2:B4 the values are 100 in each cell.

I would like to create a formula in cell C2 that sums up the data in column B IF and the value in column A is NOT equal to zero.

Has anyone done this before?

TIA

ChangeNumbers
1100
0100
1100

<colgroup><col width="64" span="2" style="width:48pt"> </colgroup><tbody>
</tbody>
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
So in the sample data would you expect C2 to return 200?

=SUMIF(A2:A4,1,B2:B4)

Will achieve this.

If you would like otherwise please let me know, as I am assuming this is what you mean(?)
 
Upvote 0
For not equal to zero you can use
=SUMIF(A:A,"<>0",B:B)
 
Upvote 0
Yes, that's correct. That's great!

Thank you tyija1995
user-online.png
.
 
Last edited:
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,429
Messages
6,119,424
Members
448,896
Latest member
MadMarty

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