beautypg.com

Apple iWork '09 User Manual

Page 199

background image

Chapter 8

Numeric Functions

199

SUMIFS(sum-values, test-values, condition, test-values…, condition…)

Â

sum-values: A collection containing the values to be summed. sum-values is a
collection containing number, date/time, or duration values.

Â

test-values: A collection containing values to be tested. test-values is a collection
containing any type of value.

Â

condition: An expression that results in a logical TRUE or FALSE. condition is an
expression that can contain anything as long as the result from comparing condition
to a value in test-values can be expressed as a Boolean value of TRUE or FALSE.

Â

test-values…:  Optionally include one or more additional collections containing
values to be tested. Each test-values collection must be followed immediately with a
condition expression. This pattern of test-values, condition can be repeated as many
times as needed.

Â

condition…:  If an optional collection of test-values is included, an expression that
results in a logical TRUE or FALSE. There must be one condition following each test-
values
collection; therefore, this function will always have an odd number of arguments.

Usage Notes

For each of the test and condition value pairs, the corresponding (same position

Â

within range or array) cell or value is compared to the condition. If all of the conditions
are met, the corresponding cell or value in sum-values is included in the sum.
All arrays must be of the same size.

Â

Examples

The following table shows part of a ledger of deliveries of a certain commodity. Each load is weighed,
rated either 1 or 2, and the date of the delivery is noted.

=SUMIFS(A2:A13,B2:B13,”=1”,C2:C13,”>=12/13/2010”,C2:C13,”<=12/17/2010”) returns 23, the number of
tons of the commodity delivered during the week of December 17 that were rated “1.”
=SUMIFS(A2:A13,B2:B13,”=2”,C2:C13,”>=12/13/2010”,C2:C13,”<=12/17/2010”) returns 34, the number of
tons of the commodity delivered during the same week that were rated “2.”