ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Absolute value (https://www.excelbanter.com/excel-programming/314581-absolute-value.html)

Jon B.

Absolute value
 
Hello,

I want to find the sum of a column, where the sum of the column adds the
absolute value of each cell. For example:

F1 = 10
F2 = -10
F3 = -5

So when I want to put in the equation in say F4, the answer would be 25 and
not -5

How do I do this for a whole column?



Rob van Gelder[_4_]

Absolute value
 
=SUMPRODUCT(SIGN(F1:F3), F1:F3)

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Jon B." <Jon wrote in message
...
Hello,

I want to find the sum of a column, where the sum of the column adds the
absolute value of each cell. For example:

F1 = 10
F2 = -10
F3 = -5

So when I want to put in the equation in say F4, the answer would be 25
and
not -5

How do I do this for a whole column?





Bob Phillips[_6_]

Absolute value
 
=SUM(ABS(A1:A1000))

which is an array formula, so commit with Ctrl-Shift-Enter

--

HTH

RP

"Jon B." <Jon wrote in message
...
Hello,

I want to find the sum of a column, where the sum of the column adds the
absolute value of each cell. For example:

F1 = 10
F2 = -10
F3 = -5

So when I want to put in the equation in say F4, the answer would be 25

and
not -5

How do I do this for a whole column?





Frank Kabel

Absolute value
 
Hi
and just another alternative combining Rob's and Bob's solution :-)
=SUMPRODUCT(ABS(A1:A10))

which does NOT need to be array entered :-)

"Jon B." wrote:

Hello,

I want to find the sum of a column, where the sum of the column adds the
absolute value of each cell. For example:

F1 = 10
F2 = -10
F3 = -5

So when I want to put in the equation in say F4, the answer would be 25 and
not -5

How do I do this for a whole column?




All times are GMT +1. The time now is 07:31 AM.

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