ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Using ABS() in a range of cells (https://www.excelbanter.com/excel-worksheet-functions/20994-using-abs-range-cells.html)

ChrisP

Using ABS() in a range of cells
 
Hi, I got a table lookin something like this

-4
3
6
-3
-2

I want to add all these numbers up using ABS() But I cant seem to get it
right.
What I tried was =SUM(ABS(A1:A4)) but that seems to be the wrong funktion.
It works if I write =SUM(ABS(A1);ABS(A2)...) but this seems idiotic hehe

/Chris



Duke Carey

=SUM(ABS(A1:A4)) is the right formula, but you need to commit it as an array
formula, meaning you commit it by pressing Ctrl-Shift-Enter, rather than
simply Enter



"ChrisP" wrote:

Hi, I got a table lookin something like this

-4
3
6
-3
-2

I want to add all these numbers up using ABS() But I cant seem to get it
right.
What I tried was =SUM(ABS(A1:A4)) but that seems to be the wrong funktion.
It works if I write =SUM(ABS(A1);ABS(A2)...) but this seems idiotic hehe

/Chris



N Harkawat

your formula needs to be array entered (ctrl+shift+enter) instead of simply
enter.
and after you did so you will see 2 braces before and after the formula as
shown below
{=SUM(ABS(A1:A4))}
"ChrisP" wrote in message
...
Hi, I got a table lookin something like this

-4
3
6
-3
-2

I want to add all these numbers up using ABS() But I cant seem to get it
right.
What I tried was =SUM(ABS(A1:A4)) but that seems to be the wrong funktion.
It works if I write =SUM(ABS(A1);ABS(A2)...) but this seems idiotic
hehe

/Chris





Dana DeLouis

The other option is the non-array formula...
=SUMPRODUCT(ABS(A1:A5))

HTH
--
Dana DeLouis
Win XP & Office 2003


"ChrisP" wrote in message
...
Hi, I got a table lookin something like this

-4
3
6
-3
-2

I want to add all these numbers up using ABS() But I cant seem to get it
right.
What I tried was =SUM(ABS(A1:A4)) but that seems to be the wrong funktion.
It works if I write =SUM(ABS(A1);ABS(A2)...) but this seems idiotic
hehe

/Chris






All times are GMT +1. The time now is 08:16 AM.

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