Friday, 30 April 2010

Summing Absolute Values in a Range in Excel

This is SURPRISINGLY not so straightforward. You can't just do:

SUM(ABS(A1:A1000))

(you will get hash-VALUE in the cell) unless you do Cntrl-Shift-Enter to convert the expression into an array formula (as opposed to a scalar formula).

This trick doesn't work though if you're using SUMIF e.g. SUMIF( rangeA, "=gazillion", abs(rangeToSum)). That won't work. You'll get an unhelpful message saying the formula you typed contains an error.

No comments: