# 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

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

#### 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
3
Views
716
Replies
4
Views
207
Replies
2
Views
41
Replies
0
Views
41
Replies
9
Views
128

Threads
1,171,462
Messages
5,875,652
Members
433,145
Latest member
nzltrippa

### 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

### 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