---
schema_version: "1"
id: b9e900bc15714a0037eb14276d9d3e0d253abf2ac25045070cc56a8b5e4791e1
title: sumif
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/sales/264-0-0/spiff_function_ref_sumif.md
canonical_url: https://help.salesforce.com/s/articleView?id=sales.spiff_function_ref_sumif.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 8bda5534f40c821663c2b4a9937d4460b569a4ce0205418f45196c1cb4473a29
description: Calculates a total value from a list of numbers in Salesforce Spiff, but only for records that satisfy a specified condition.
products:
  - Sales Cloud
  - Sales Enablement
release: "264"
---
# sumif

Calculates a total value from a list of numbers in Salesforce Spiff, but only for records that satisfy a specified condition.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: both Salesforce Classic (not available in all orgs) and Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>, <strong>Unlimited</strong>, and <strong>Developer</strong> Editions</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available for an additional cost in: <strong>Professional</strong> Edition with Web Services API Enabled</td></tr></tbody></table>

## Syntax

```
sumif(filter, condition, column_or_field)
```

## Arguments

  
| Argument | Required? | Description |
| --- | --- | --- |
| filter | Required | The data filter with a list of records to sum. Enclose a list in brackets with comma-separated values. |
| condition | Required | An expression that specifies a condition that must be true for the function to calculate a sum. To specify multiple conditions, use AND or OR operators. |
| column\_or\_field | Required if summing a data filter | An expression that specifies the column or field from the filter's records that you want to sum. |

## Considerations

- This function returns the same values as the standard `sum()` function that uses an optional condition. But, this function better describes the result of the formula that uses it, which is useful for internal accountability.
- You can use other formulas for the condition or column\_or\_field arguments, but only if the formulas apply to the same object as filter.

## Example

Sum the value of the ARR\_\_c field, but only if the ARR\_\_c value is greater than $25,000.

```
=sumif(ClosedInPeriod, ARR__c > 25000, ARR__c)
```

Sum the value of the ARR\_\_c field, but only if the ARR\_\_c value is greater than $25,000 and less than $50,000.

```
=sum(ClosedInPeriod, ARR__c > 25000 AND ARR__c < 50000, ARR__c)
```