# SUMIF absolute values

#### pero

##### New Member
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.
 A B X 1 Y -5 Y 4 X -3 Y 1
<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
Not with sumif, you'd have to use sumproduct..

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

#### NBVC

##### Well-known Member
Try:

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

#### pero

##### New Member
Thank you both work like a charm!!

#### Jonmo1

##### MrExcel MVP
Glad to help, thanks for the feedback.

Replies
2
Views
304
Replies
3
Views
131
Replies
3
Views
58
Replies
3
Views
136
Replies
3
Views
45

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?

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