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

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
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,215,824
Messages
6,127,092
Members
449,358
Latest member
Snowinx

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