SUMIF absolute values

pero

New Member
Joined
Aug 4, 2011
Messages
4
Is there a way to structure a conditional sum function (e.g. SUMIF) to add together the absolute values in a set of positive and negative numbers in a column. In the example below the goal is to sum only the Y absolute numbers in column B and the results should be 10.
AB
X1
Y-5
Y4
X-3
Y1
<tbody> </tbody>
Any help on this is appreciated. Thanks!
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Jonmo1

MrExcel MVP
Joined
Oct 12, 2006
Messages
44,061
Not with sumif, you'd have to use sumproduct..

Try
=SUMPRODUCT((A2:A100="Y")*ABS(B2:B100))
 

NBVC

Well-known Member
Joined
Aug 31, 2005
Messages
5,828
Try:

=SUMIFS(B2:B6,A2:A6,"Y",B2:B6,">0")-SUMIFS(B2:B6,A2:A6,"Y",B2:B6,"<0")
 

Forum statistics

Threads
1,137,059
Messages
5,679,368
Members
419,823
Latest member
Mercy kiara

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
Top