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

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Not with sumif, you'd have to use sumproduct..

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

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

Forum statistics

Threads
1,213,526
Messages
6,114,136
Members
448,551
Latest member
Sienna de Souza

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