![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 4
|
Hi
I would appreciate it if anyone could advise on how I could add a column of positve and negative numbers, so that the end result is the value of the total of the absolute number? -55 85 -52 =192 Thanks |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Posts: 1,805
|
Hunter,
Just enter: =SUM(ABS(A1:A3)) Array enter by pressing ctrl+shift+enter Eli |
|
|
|
|
|
#3 |
|
New Member
Join Date: Apr 2002
Posts: 4
|
Hi Eli
Thank you so much for your wonderful help. It works. |
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Denver, CO
Posts: 1,744
|
A non-array solution would be
=SUMIF(A1:A3,">0")-SUMIF(A1:A3,"<0") I would suggest going with eliW's answer as long you don't notice any performance issues (ie your have to use the formula many, many times) |
|
|
|
|
|
#5 |
|
New Member
Join Date: Apr 2002
Posts: 4
|
Hi IML
Thanks for your advice too. Your method works too and I would adopt your approach, as I do have some performance issues. I need to apply this formula across 10 columns actually. Best regards Hunter [ This Message was edited by: Hunter on 2002-04-19 06:19 ] |
|
|
|
|
|
#6 |
|
Join Date: Mar 2002
Posts: 12
|
Or :-
=SUM(A1:A3)-SUMIF(A1:A3,"<0")*2 |
|
|
|
|
|
#7 |
|
New Member
Join Date: Apr 2002
Posts: 4
|
Hi Adcb
Thanks a lot. Regards Hunter |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|