Adding values ignoring (-)

NG7267

New Member
Joined
Dec 24, 2013
Messages
8
How can I add values taking their abs value as given below.

2
-4
-2
1
3
Total12

<colgroup><col style="width:48pt" span="2" width="64"> </colgroup><tbody>
</tbody>
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
NG7267,

Try the array formula.. =SUM(ABS(B1:B5))

Confirm with Ctrl + Shift + Enter

Hope that helps.
 
Upvote 0
Hi Snakehips,

Thank you very much for your reply,I have data in one sheet and summary table in another sheet, Since there are around 30 cells in the summary sheet which needs adding data (abs) values from data sheet,it is difficult to do ctrl+shift+enter every time, Is there any way that I can use first adding positives then adding negatives after multypling by (-1) in the same formula or any other solution,

Thank you so much !
 
Upvote 0
Either way you still have to only enter a formula in each summary cell the once ???

However you can try this which although an array formula by virtue of SUMPRODUCT, does not require C + S + E confirmation.

=SUMPRODUCT((B1:B5>0)*(B1:B5)+(B1:B5<0)*(B1:B5)*(-1))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,373
Messages
6,130,234
Members
449,567
Latest member
ashsweety

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