ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Sum of a range of absolute numbers (https://www.excelbanter.com/excel-worksheet-functions/205027-sum-range-absolute-numbers.html)

SteveG[_3_]

Sum of a range of absolute numbers
 
I need to sum a row of numbers that are both positive and negative. What I
would like to do is sum them as absolute values.

Example:
A1=2, B1=-3, C1=-1, D1=5
Sum(abs(A1:D1)) should equal 11 (2+3+1+5) not 3 (2-3-1+5).

This doesn't work. Does anyone have a suggestion on how to do this.

Thomas [PBD]

Sum of a range of absolute numbers
 
SteveG,

Please use:
=SUMPRODUCT(ABS(A1:D1))

--
--Thomas [PBD]
Working hard to make working easy.
Answered your question? Click ''Yes'' below.


"SteveG" wrote:

I need to sum a row of numbers that are both positive and negative. What I
would like to do is sum them as absolute values.

Example:
A1=2, B1=-3, C1=-1, D1=5
Sum(abs(A1:D1)) should equal 11 (2+3+1+5) not 3 (2-3-1+5).

This doesn't work. Does anyone have a suggestion on how to do this.


Tom Hutchins

Sum of a range of absolute numbers
 
You need to enter your formula as an array formula. After you type it in,
press Ctrl-Shift-Enter instead of Enter. If you do it correctly, Excel will
wrap curly brackets {} around your formula (don't type them yourself.)

You could also use SUMPRODUCT instead (it's entered like any normal function):

=SUMPRODUCT(ABS(A1:D1))

Hope this helps,

Hutch

"SteveG" wrote:

I need to sum a row of numbers that are both positive and negative. What I
would like to do is sum them as absolute values.

Example:
A1=2, B1=-3, C1=-1, D1=5
Sum(abs(A1:D1)) should equal 11 (2+3+1+5) not 3 (2-3-1+5).

This doesn't work. Does anyone have a suggestion on how to do this.


Mike H

Sum of a range of absolute numbers
 
Steve,

Your formula
=Sum(abs(A1:D1))

Will give the correct answer if you enter it by pressing Ctrl+Shift+Enter
and NOT just enter. If you do it correctly excel will put curly brackets
around it {}. You cant type these yourself.

Mike


"SteveG" wrote:

I need to sum a row of numbers that are both positive and negative. What I
would like to do is sum them as absolute values.

Example:
A1=2, B1=-3, C1=-1, D1=5
Sum(abs(A1:D1)) should equal 11 (2+3+1+5) not 3 (2-3-1+5).

This doesn't work. Does anyone have a suggestion on how to do this.


SteveG[_3_]

Sum of a range of absolute numbers
 
This worked great. Thanks.

"Thomas [PBD]" wrote:

SteveG,

Please use:
=SUMPRODUCT(ABS(A1:D1))

--
--Thomas [PBD]
Working hard to make working easy.
Answered your question? Click ''Yes'' below.


"SteveG" wrote:

I need to sum a row of numbers that are both positive and negative. What I
would like to do is sum them as absolute values.

Example:
A1=2, B1=-3, C1=-1, D1=5
Sum(abs(A1:D1)) should equal 11 (2+3+1+5) not 3 (2-3-1+5).

This doesn't work. Does anyone have a suggestion on how to do this.



All times are GMT +1. The time now is 04:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com