summing a range of absolute values

  • Thread starter Thread starter JE McGimpsey
  • Start date Start date
Can I take a range like the following:
-200
300
-50

and sum the absolute value of each of these, so that the Total will be 550?

I'm using the Sumif function and would like to apply the ABS to every value
in this range.

Thanks,

Harold
 
One way to simplify the task would be to fill an adjacent column of the
sum range with the ABS equivalent (using abs(cell)), then use the new
column as your sum range in the SUMIF function.
 
Good. But if nothing in col A then try just using blank. Any blank column
will do.
=SUMPRODUCT(--(A1:A100=""),ABS(B1:B100))
 
Not sure I follow...

If there is nothing in column A, one could instead use

=SUMPRODUCT(ABS(B1:B100))

or, array-entered,

=SUM(ABS(B1:B100))

Since the OP said he was using SUMIF() I assumed there was another
criterion.
 
If you wish to use SumIf, another option might be something like this. This
behaves a little nicer with any text or errors within the range.
=SUMIF(A1:A10,">0")-SUMIF(A1:A10,"<0")

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top