Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
fsinsd
 
Posts: n/a
Default How do I sum the absolute values of a range of cells?

I want to obtain the sum of a group of cell using the absolute values of what
is contained in these cells. How can I do this without creating a seperate
cell for each to reduce with the ABS function?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Chip Pearson
 
Posts: n/a
Default How do I sum the absolute values of a range of cells?

Use the following array formula:

=SUM(ABS(A1:A10))

Since this is an array formula, you must press CTRL+SHIFT+ENTER
rather than just ENTER when you first enter the formula and
whenever you edit it later. If you do this properly, Excel will
display the formula enclosed in curly braces {}.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"fsinsd" wrote in message
...
I want to obtain the sum of a group of cell using the absolute
values of what
is contained in these cells. How can I do this without
creating a seperate
cell for each to reduce with the ABS function?



  #3   Report Post  
Posted to microsoft.public.excel.misc
Bruce Sinclair
 
Posts: n/a
Default How do I sum the absolute values of a range of cells?

In article , "Chip Pearson" wrote:
Use the following array formula:

=SUM(ABS(A1:A10))

Since this is an array formula, you must press CTRL+SHIFT+ENTER
rather than just ENTER when you first enter the formula and
whenever you edit it later. If you do this properly, Excel will
display the formula enclosed in curly braces {}.


Hi Chip

Can you clear something up for me ? ... I've never really understood why
some formulae are "array" and some are not. Looking at your example above
(one of the shortest array formula I've seen :) ) it would seem to be
because there is a range involved in the calculation instead of a cell.

Am I onto it here ... or still missing something ? :)

IIRC there are some functions that are array formulae by their nature ...
but that nature may again simply be that underlying range of values ...
which may not be immediately obvious to some of us :).

Thanks


Bruce

----------------------------------------
I believe you find life such a problem because you think there are the good
people and the bad people. You're wrong, of course. There are, always and
only, the bad people, but some of them are on opposite sides.

Lord Vetinari in Guards ! Guards ! - Terry Pratchett

Caution ===== followups may have been changed to relevant groups
(if there were any)

  #4   Report Post  
Posted to microsoft.public.excel.misc
Chip Pearson
 
Posts: n/a
Default How do I sum the absolute values of a range of cells?


"Bruce Sinclair"
wrote in
message
it would seem to be
because there is a range involved in the calculation instead of
a cell.


Yes, the formula needs to be array-entered because the entire
range A1:A10 needs to be passed to ABS, and ABS returns an array
of values, each of which is the absolute value of input element.

See http://www.cpearson.com/excel/array.htm for more info about
array formulas.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"Bruce Sinclair"
wrote in
message ...
In article , "Chip
Pearson" wrote:
Use the following array formula:

=SUM(ABS(A1:A10))

Since this is an array formula, you must press CTRL+SHIFT+ENTER
rather than just ENTER when you first enter the formula and
whenever you edit it later. If you do this properly, Excel will
display the formula enclosed in curly braces {}.


Hi Chip

Can you clear something up for me ? ... I've never really
understood why
some formulae are "array" and some are not. Looking at your
example above
(one of the shortest array formula I've seen :) ) it would seem
to be
because there is a range involved in the calculation instead of
a cell.

Am I onto it here ... or still missing something ? :)

IIRC there are some functions that are array formulae by their
nature ...
but that nature may again simply be that underlying range of
values ...
which may not be immediately obvious to some of us :).

Thanks


Bruce

----------------------------------------
I believe you find life such a problem because you think there
are the good
people and the bad people. You're wrong, of course. There are,
always and
only, the bad people, but some of them are on opposite sides.

Lord Vetinari in Guards ! Guards ! - Terry Pratchett

Caution ===== followups may have been changed to relevant
groups
(if there were any)



  #5   Report Post  
Posted to microsoft.public.excel.misc
Paul Lautman
 
Posts: n/a
Default How do I sum the absolute values of a range of cells?

Chip Pearson wrote:
Use the following array formula:

=SUM(ABS(A1:A10))

Since this is an array formula, you must press CTRL+SHIFT+ENTER
rather than just ENTER when you first enter the formula and
whenever you edit it later. If you do this properly, Excel will
display the formula enclosed in curly braces {}.

Or

=SUMPRODUCT(ABS(A1:A10))

which does not need to be entered as an array formula.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy/Paste how to avoid the copy of formula cells w/o calc values Dennis Excel Discussion (Misc queries) 10 March 2nd 06 10:47 PM
Automatically clear values from a range of selected cells John Davies Excel Discussion (Misc queries) 1 June 28th 05 04:42 PM
Counting empty cells within a range of cells Rosehill - ExcelForums.com New Users to Excel 2 May 2nd 05 08:53 AM
How To Use Cells Without Values in a Formula Roger H. Excel Worksheet Functions 2 April 6th 05 01:01 AM
Applying formula to only NON-EMPTY cells in range Tasi Excel Discussion (Misc queries) 5 March 29th 05 10:48 PM


All times are GMT +1. The time now is 02:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"