SumIf

You use the SumIf function to sum the values in a range that meet criteria that you specify. For example, suppose that in a column that contains numbers, you want to sum only the values that are larger than 5. You can use the following formula: =SumIf([Table Name]![2][1]:[2][8],">5")

Syntax

SumIf(range, criteria, [sumRange])

The SumIf function syntax has the following arguments:

• range - Required. The range of cells that you want evaluated by criteria. Cells in each range must be numbers or names, arrays, or references that contain numbers. Blank and text values are ignored. The selected range may contain dates in standard GoFormz format (examples below).

• criteria - Required. The criteria in the form of a number, expression, a cell reference, text, or a function that defines which cells will be added. For example, criteria can be expressed as 32, ">32", [Field Name], "32", or "apples".

🚧Important:

Any text criteria or any criteria that includes logical or mathematical symbols must be enclosed in double quotation marks ("). If the criteria is numeric, double quotation marks are not required.

• sumRange - Optional. The actual cells to add, if you want to add cells other than those specified in the range argument. If the sumRange argument is omitted, GoFormz adds the cells that are specified in the range argument (the same cells to which the criteria is applied).

Example 1

Table Name: Properties

Property Value

Commission

Data

\$100,000

\$7,000

\$250,000

\$200,000

\$14,000

\$300,000

\$21,000

\$400,000

\$28,000

Formula

Description

Result

=SumIf([Properties]![1][1]:[1][4], ">160000", [Properties]![2][1]:[2][4])

Sum of the commissions for property values over \$160,000.

\$63,000

=SumIf([Properties]![1][1]:[1][4], ">160000")

Sum of the property values over \$160,000.

\$900,000

=SumIf([Properties]![1][1]:[1][4], 300000, [Properties]![2][1]:[2][4])

Sum of the commissions for property values equal to \$300,000.

\$21,000

=SumIf([Properties]![1][1]:[1][4], ">" & [Properties]![3][1], [Properties]![2][1]:[2][4])

Sum of the commissions for property values greater than the value in Column 3 Row 1.

\$49,000

Example 2

Table Name: Food

Category

Food

Sales

Vegetables

Tomatoes

\$2,300

Vegetables

Celery

\$5,500

Fruits

Oranges

\$800

Butter

\$400

Vegetables

Carrots

\$4,200

Fruits

Apples

\$1,200

Formula

Description

Result

=SumIf([Food]![1][1]:[1][6], "Fruits", [Food]![3][1]:[3][6])

Sum of the sales of all foods in the "Fruits" category.

\$2,000

=SumIf([Food]![1][1]:[1][6], "Vegetables", [Food]![3][1]:[3][6])

Sum of the sales of all foods in the "Vegetables" category.

\$12,000

=SumIf([Food]![1][1]:[1][6], "", [Food]![3][1]:[3][6])

Sum of the sales of all foods that do not have a category specified.

\$400