Totaling Absolute Values

Jtucker10278

Board Regular
Joined
May 14, 2017
Messages
55
Doing inventory,

Item A is short -3
Item B is over +3

Total amount of inventory +/- is 0 but in reality I am off by 6

I know ABS returns the absolute value of a number and it is not a big deal to add an extra column for ABS Value

But I was wondering if there was a neat trick to totaling the absolute value without the extra column

Thanks
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
you could multiply them both by 1 or -1 depending on what they are and then add them up something like this


=SUM(IF(A1<0,A1*-1,A1),IF(A2<0,A2*-1,A2))

assuming your -3 is in A1 and your 3 is in A2

or the ABS way would be

=SUM(ABS(A1),ABS(A2))
 
Last edited:
Upvote 0

Excel 2010
AB
8-3
93
106
Sheet1
Cell Formulas
RangeFormula
B10{=SUM(ABS(A8:A9))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Or if you don't want to enter as an array function using CSE then =SUMPRODUCT(ABS(A1:A10)) will also work (change A1:A10 to your range ID) with just Enter.
 
Upvote 0

Forum statistics

Threads
1,213,531
Messages
6,114,167
Members
448,554
Latest member
Gleisner2

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