Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 213
Default Need Help with "SUM" AND "ABS" in same formula

The cells in a SUM formula all include formulas that provide the cells with
negative numbers, positive numbers and blank cells. Need to have the
respective values to be used in another formula as absolute values. Need to
have the negative values in the range to stay displayed as negatives and the
blank cells in the range to stay displayed as blank. Tried using
=sum(abs(range)), which works fine if the blank cells are omitted from the
range. If the blank cells are part of the range the result is "#VALUE!". Is
there something to add to resolve the error message?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,059
Default Need Help with "SUM" AND "ABS" in same formula

"Randy" wrote:
Tried using
=sum(abs(range)), which works fine if the blank cells are omitted from the
range. If the blank cells are part of the range the result is "#VALUE!".


You need to enter =SUM(ABS(range)) as an array formula. That is, press with
ctrl-shift-Enter instead of just Enter. At this point, you can select the
cell, press F2, then press ctrl-shift-Enter.

Alternatively, use the formula =SUMPRODUCT(ABS(range)), which is not an
array formula; simply press Enter.


----- original message -----

"Randy" wrote in message
...
The cells in a SUM formula all include formulas that provide the cells
with
negative numbers, positive numbers and blank cells. Need to have the
respective values to be used in another formula as absolute values. Need
to
have the negative values in the range to stay displayed as negatives and
the
blank cells in the range to stay displayed as blank. Tried using
=sum(abs(range)), which works fine if the blank cells are omitted from the
range. If the blank cells are part of the range the result is "#VALUE!".
Is
there something to add to resolve the error message?


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default Need Help with "SUM" AND "ABS" in same formula

Hi Randy,
ISNA OR ISERR will help, could you post your formula. thanks

"Randy" wrote:

The cells in a SUM formula all include formulas that provide the cells with
negative numbers, positive numbers and blank cells. Need to have the
respective values to be used in another formula as absolute values. Need to
have the negative values in the range to stay displayed as negatives and the
blank cells in the range to stay displayed as blank. Tried using
=sum(abs(range)), which works fine if the blank cells are omitted from the
range. If the blank cells are part of the range the result is "#VALUE!". Is
there something to add to resolve the error message?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,059
Default Need Help with "SUM" AND "ABS" in same formula

PS....

"Randy" wrote:
Tried using =sum(abs(range)), which works fine if the blank cells are
omitted from the range. If the blank cells are part of the range the
result
is "#VALUE!".


Hmm.... There might be something wrong with my understanding of your
problem. SUM(ABS(range)) should __always__ return #VALUE unless you enter
the formula as an array formula. And if you enter an array formula,
SUM(ABS(range)) should __always__ work regardless of the presence of empty
cells in the range.

But if the "blank cells" contain text, notably "", you will need the
following array formula (again, commit with ctrl-shift-Enter, not just
Enter):

=SUM(IF(range<"",ABS(range)))

Also note: the SUMPRODUCT alternative will not work as a non-array formula.


----- original message -----

"JoeU2004" wrote in message
...
"Randy" wrote:
Tried using
=sum(abs(range)), which works fine if the blank cells are omitted from
the
range. If the blank cells are part of the range the result is "#VALUE!".


You need to enter =SUM(ABS(range)) as an array formula. That is, press
with ctrl-shift-Enter instead of just Enter. At this point, you can
select the cell, press F2, then press ctrl-shift-Enter.

Alternatively, use the formula =SUMPRODUCT(ABS(range)), which is not an
array formula; simply press Enter.


----- original message -----

"Randy" wrote in message
...
The cells in a SUM formula all include formulas that provide the cells
with
negative numbers, positive numbers and blank cells. Need to have the
respective values to be used in another formula as absolute values. Need
to
have the negative values in the range to stay displayed as negatives and
the
blank cells in the range to stay displayed as blank. Tried using
=sum(abs(range)), which works fine if the blank cells are omitted from
the
range. If the blank cells are part of the range the result is "#VALUE!".
Is
there something to add to resolve the error message?



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,276
Default Need Help with "SUM" AND "ABS" in same formula

Opps, I didn't realize you posted your formula, try

=SUMPRODUCT(ABS(C11:C14))

change c11:c14 for your range

"Eduardo" wrote:

Hi Randy,
ISNA OR ISERR will help, could you post your formula. thanks

"Randy" wrote:

The cells in a SUM formula all include formulas that provide the cells with
negative numbers, positive numbers and blank cells. Need to have the
respective values to be used in another formula as absolute values. Need to
have the negative values in the range to stay displayed as negatives and the
blank cells in the range to stay displayed as blank. Tried using
=sum(abs(range)), which works fine if the blank cells are omitted from the
range. If the blank cells are part of the range the result is "#VALUE!". Is
there something to add to resolve the error message?



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Need Help with "SUM" AND "ABS" in same formula

Try this array formula** :

=SUM(IF(ISNUMBER(A1:A10),ABS(A1:A10)))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP


"Randy" wrote in message
...
The cells in a SUM formula all include formulas that provide the cells
with
negative numbers, positive numbers and blank cells. Need to have the
respective values to be used in another formula as absolute values. Need
to
have the negative values in the range to stay displayed as negatives and
the
blank cells in the range to stay displayed as blank. Tried using
=sum(abs(range)), which works fine if the blank cells are omitted from the
range. If the blank cells are part of the range the result is "#VALUE!".
Is
there something to add to resolve the error message?



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default Need Help with "SUM" AND "ABS" in same formula

How about a couple of *non* array formulas:

=SUMIF(A1:A10,"0")-SUMIF(A1:A10,"<0")

=SUM(ABS(SUMIF(A1:A10,{"0","<0"})))

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Randy" wrote in message
...
The cells in a SUM formula all include formulas that provide the cells
with
negative numbers, positive numbers and blank cells. Need to have the
respective values to be used in another formula as absolute values. Need
to
have the negative values in the range to stay displayed as negatives and
the
blank cells in the range to stay displayed as blank. Tried using
=sum(abs(range)), which works fine if the blank cells are omitted from the
range. If the blank cells are part of the range the result is "#VALUE!".
Is
there something to add to resolve the error message?



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 213
Default Need Help with "SUM" AND "ABS" in same formula

"JoeU200"
Thank You, the =SUM(IF(range<"",ABS(range))) works fine.


"JoeU2004" wrote:

PS....

"Randy" wrote:
Tried using =sum(abs(range)), which works fine if the blank cells are
omitted from the range. If the blank cells are part of the range the
result
is "#VALUE!".


Hmm.... There might be something wrong with my understanding of your
problem. SUM(ABS(range)) should __always__ return #VALUE unless you enter
the formula as an array formula. And if you enter an array formula,
SUM(ABS(range)) should __always__ work regardless of the presence of empty
cells in the range.

But if the "blank cells" contain text, notably "", you will need the
following array formula (again, commit with ctrl-shift-Enter, not just
Enter):

=SUM(IF(range<"",ABS(range)))

Also note: the SUMPRODUCT alternative will not work as a non-array formula.


----- original message -----

"JoeU2004" wrote in message
...
"Randy" wrote:
Tried using
=sum(abs(range)), which works fine if the blank cells are omitted from
the
range. If the blank cells are part of the range the result is "#VALUE!".


You need to enter =SUM(ABS(range)) as an array formula. That is, press
with ctrl-shift-Enter instead of just Enter. At this point, you can
select the cell, press F2, then press ctrl-shift-Enter.

Alternatively, use the formula =SUMPRODUCT(ABS(range)), which is not an
array formula; simply press Enter.


----- original message -----

"Randy" wrote in message
...
The cells in a SUM formula all include formulas that provide the cells
with
negative numbers, positive numbers and blank cells. Need to have the
respective values to be used in another formula as absolute values. Need
to
have the negative values in the range to stay displayed as negatives and
the
blank cells in the range to stay displayed as blank. Tried using
=sum(abs(range)), which works fine if the blank cells are omitted from
the
range. If the blank cells are part of the range the result is "#VALUE!".
Is
there something to add to resolve the error message?




  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 213
Default Need Help with "SUM" AND "ABS" in same formula

"T. Valko"
-Thank You, the formula works fine.

"T. Valko" wrote:

Try this array formula** :

=SUM(IF(ISNUMBER(A1:A10),ABS(A1:A10)))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP


"Randy" wrote in message
...
The cells in a SUM formula all include formulas that provide the cells
with
negative numbers, positive numbers and blank cells. Need to have the
respective values to be used in another formula as absolute values. Need
to
have the negative values in the range to stay displayed as negatives and
the
blank cells in the range to stay displayed as blank. Tried using
=sum(abs(range)), which works fine if the blank cells are omitted from the
range. If the blank cells are part of the range the result is "#VALUE!".
Is
there something to add to resolve the error message?




  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 213
Default Need Help with "SUM" AND "ABS" in same formula

"RagDyer"
-Thank You, they both work.

"RagDyer" wrote:

How about a couple of *non* array formulas:

=SUMIF(A1:A10,"0")-SUMIF(A1:A10,"<0")

=SUM(ABS(SUMIF(A1:A10,{"0","<0"})))

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Randy" wrote in message
...
The cells in a SUM formula all include formulas that provide the cells
with
negative numbers, positive numbers and blank cells. Need to have the
respective values to be used in another formula as absolute values. Need
to
have the negative values in the range to stay displayed as negatives and
the
blank cells in the range to stay displayed as blank. Tried using
=sum(abs(range)), which works fine if the blank cells are omitted from the
range. If the blank cells are part of the range the result is "#VALUE!".
Is
there something to add to resolve the error message?






  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 213
Default Need Help with "SUM" AND "ABS" in same formula

"RagDyer"
-Thank You, they both work fine.

"RagDyer" wrote:

How about a couple of *non* array formulas:

=SUMIF(A1:A10,"0")-SUMIF(A1:A10,"<0")

=SUM(ABS(SUMIF(A1:A10,{"0","<0"})))

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Randy" wrote in message
...
The cells in a SUM formula all include formulas that provide the cells
with
negative numbers, positive numbers and blank cells. Need to have the
respective values to be used in another formula as absolute values. Need
to
have the negative values in the range to stay displayed as negatives and
the
blank cells in the range to stay displayed as blank. Tried using
=sum(abs(range)), which works fine if the blank cells are omitted from the
range. If the blank cells are part of the range the result is "#VALUE!".
Is
there something to add to resolve the error message?




  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,572
Default Need Help with "SUM" AND "ABS" in same formula

You're welcome, and thanks for the feed-back.
--

Regards,

RD
-----------------------------------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
-----------------------------------------------------------------------------------------------

"Randy" wrote in message
...
"RagDyer"
-Thank You, they both work fine.

"RagDyer" wrote:

How about a couple of *non* array formulas:

=SUMIF(A1:A10,"0")-SUMIF(A1:A10,"<0")

=SUM(ABS(SUMIF(A1:A10,{"0","<0"})))

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Randy" wrote in message
...
The cells in a SUM formula all include formulas that provide the cells
with
negative numbers, positive numbers and blank cells. Need to have the
respective values to be used in another formula as absolute values.
Need
to
have the negative values in the range to stay displayed as negatives and
the
blank cells in the range to stay displayed as blank. Tried using
=sum(abs(range)), which works fine if the blank cells are omitted from
the
range. If the blank cells are part of the range the result is
"#VALUE!".
Is
there something to add to resolve the error message?






  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Need Help with "SUM" AND "ABS" in same formula

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Randy" wrote in message
...
"T. Valko"
-Thank You, the formula works fine.

"T. Valko" wrote:

Try this array formula** :

=SUM(IF(ISNUMBER(A1:A10),ABS(A1:A10)))

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the
SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP


"Randy" wrote in message
...
The cells in a SUM formula all include formulas that provide the cells
with
negative numbers, positive numbers and blank cells. Need to have the
respective values to be used in another formula as absolute values.
Need
to
have the negative values in the range to stay displayed as negatives
and
the
blank cells in the range to stay displayed as blank. Tried using
=sum(abs(range)), which works fine if the blank cells are omitted from
the
range. If the blank cells are part of the range the result is
"#VALUE!".
Is
there something to add to resolve the error message?






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
correct syntax for nesting "if", "and", and "vlookup"....if possib Christine Excel Worksheet Functions 4 January 2nd 09 10:43 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


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

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

About Us

"It's about Microsoft Excel"