DSUM

Syntax:

DSUM(range, condition)

Returns the sum of all those values in the range for which the condition is satisfied.

Example:

DSUM(B3:B8, B3:B8<0)

will return the sum of all the negative numbers in cells B3 to B8.

See DAVG for more examples of how to use the condition to control which cells are included.