sumif with multiple conditions

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 sumifs formula which sums up negative values only.

I've created a simple example below, where I've written a sumif which sums up the values for the name "Matthew" in column B (you can copy and paste the data below into a new workbook - it starts in cell A1).

There are THREE instances of the name Matthew, with values, -3, -3 and 2. At present the sumifs returns a value of -4 because it's summing up all values (positive and negative).

However, I'd like it to only sum up the negative values and return -6. Does anyone know how to do this, please?

Thanks in advance.

[TABLE="width: 256"]
<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>[TR]
[TD="class: xl63, width: 64"]Name[/TD]
[TD="class: xl63, width: 64"]Value[/TD]
[TD="width: 64"][/TD]
[TD="class: xl63, width: 64"]Sumifs[/TD]
[/TR]
[TR]
[TD="class: xl63"]Matthew[/TD]
[TD="class: xl63, align: right"]-3[/TD]
[TD][/TD]
[TD="class: xl63, align: right"]-4[/TD]
[/TR]
[TR]
[TD="class: xl63"]Mark[/TD]
[TD="class: xl63"] [/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl63"]Luke[/TD]
[TD="class: xl63"] [/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl63"]John [/TD]
[TD="class: xl63"] [/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl63"]Matthew[/TD]
[TD="class: xl63, align: right"]-3[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl63"]Mark[/TD]
[TD="class: xl63"] [/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl63"]Luke[/TD]
[TD="class: xl63"] [/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl63"]John [/TD]
[TD="class: xl63"] [/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl63"]Matthew[/TD]
[TD="class: xl63, align: right"]2[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl63"]Mark[/TD]
[TD="class: xl63"] [/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl63"]Luke[/TD]
[TD="class: xl63"] [/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="class: xl63"]John [/TD]
[TD="class: xl63"] [/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Forum statistics

Threads
1,223,711
Messages
6,174,025
Members
452,542
Latest member
Bricklin

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