Absolute Value of Range

jstevens
GoldLounger
Posts: 2631
Joined: 26 Jan 2010, 16:31
Location: Southern California

Absolute Value of Range

Post by jstevens »

Is there a way to calculate the absolute value of a range of cells through a formula? The range contains positive and negative.
untitled.png
Thanks,
John
You do not have the required permissions to view the files attached to this post.
Regards,
John

User avatar
HansV
Administrator
Posts: 78629
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Absolute Value of Range

Post by HansV »

If you want to sum the absolute values of the cells in A2:C5, use the following array formula (confirm with Ctrl+Shift+Enter):

=SUM(ABS(A2:C5))
Best wishes,
Hans

jstevens
GoldLounger
Posts: 2631
Joined: 26 Jan 2010, 16:31
Location: Southern California

Re: Absolute Value of Range

Post by jstevens »

Hans,

You're amazing.

I was so close with =ABS(SUM(A2:C5))

Regards,
John
Regards,
John

User avatar
HansV
Administrator
Posts: 78629
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Absolute Value of Range

Post by HansV »

Your formula will first sum the original numbers (positive and negative), then take the absolute value of the sum.
But you want to calculate the sum of the absolute values, hence SUM(ABS(...))
Best wishes,
Hans