---
title: "SUMIF function in Excel: syntax and examples | PracticeExcel"
description: "How to use SUMIF in Excel and Google Sheets: add only the rows that meet a condition. Syntax, examples and a live drill."
canonical_url: "https://practiceexcelonline.com/functions/sumif"
locale: en
meta:
  "og:description": "How to use SUMIF in Excel and Google Sheets: add only the rows that meet a condition. Syntax, examples and a live drill."
  "og:image": "https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~U1VNSUYgZnVuY3Rpb24gaW4gRXhjZWw6IHN5bnRheCBhbmQgZXhhbXBsZXM%2Cdescription_~SG93IHRvIHVzZSBTVU1JRiBpbiBFeGNlbCBhbmQgR29vZ2xlIFNoZWV0czogYWRkIG9ubHkgdGhlIHJvd3MgdGhhdCBtZWV0IGEgY29uZGl0aW9uLiBTeW50YXgsIGV4YW1wbGVzIGFuZCBhIGxpdmUgZHJpbGwu%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_~U1VNSUYocmFuZ2UsIGNyaXRlcmlhLCBbc3VtX3JhbmdlXSk%2Cp_Ii9mdW5jdGlvbnMvc3VtaWYi%2Cs_O0S-yUpMULYKTHFJ.png"
  "og:image:height": "600"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "SUMIF function in Excel: syntax and examples | PracticeExcel"
  "twitter:image": "https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~U1VNSUYgZnVuY3Rpb24gaW4gRXhjZWw6IHN5bnRheCBhbmQgZXhhbXBsZXM%2Cdescription_~SG93IHRvIHVzZSBTVU1JRiBpbiBFeGNlbCBhbmQgR29vZ2xlIFNoZWV0czogYWRkIG9ubHkgdGhlIHJvd3MgdGhhdCBtZWV0IGEgY29uZGl0aW9uLiBTeW50YXgsIGV4YW1wbGVzIGFuZCBhIGxpdmUgZHJpbGwu%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_~U1VNSUYocmFuZ2UsIGNyaXRlcmlhLCBbc3VtX3JhbmdlXSk%2Cp_Ii9mdW5jdGlvbnMvc3VtaWYi%2Cs_O0S-yUpMULYKTHFJ.png"
---

> Index of every page on this site: [llms.txt](https://practiceexcelonline.com/llms.txt)

# **The SUMIF function**

Adds the cells that meet one condition. The condition can be checked in the same range or in another column.

=

SUMIF(

## **Syntax**

```
SUMIF(range, criteria, [sum_range])
```

<dl><dt>**range **</dt>
<dd>The cells the condition is checked against.</dd>
<dt>**criteria **</dt>
<dd>The condition, such as "North", "&gt;300" or a cell like E1.</dd>
<dt>**sum_range **(optional)</dt>
<dd>The cells to add. If left out, range itself is added.</dd></dl>

## **Examples**

E1`=SUMIF(<sup>1</sup>A2:A6,<sup>2</sup>"North",<sup>3</sup>C2:C6)`

|  | A | B | C | D | E |
| --- | --- | --- | --- | --- | --- |
| 1 | Region | Product | Sales |  | **1170** |
| 2 | North | Shoes | 500 |  | |
| 3 | South | Shoes | 300 |  | |
| 4 | North | Bags | 250 |  | |
| 5 | North | Shoes | 420 |  | |
| 6 | South | Bags | 180 |  | |

**In plain words:** Add up <sup>3</sup>the sales in C2:C6 on the rows where <sup>1</sup>the region in A2:A6 is <sup>2</sup>North.

E1=SUMIF(C2:C6,">300")

|  | A | B | C | D | E |
| --- | --- | --- | --- | --- | --- |
| 1 | Region | Product | Sales |  | **920** |
| 2 | North | Shoes | 500 |  | |
| 3 | South | Shoes | 300 |  | |
| 4 | North | Bags | 250 |  | |
| 5 | North | Shoes | 420 |  | |
| 6 | South | Bags | 180 |  | |

## **Practice SUMIF**

- [**1****SUMIF with a text criterion**→](https://practiceexcelonline.com/practice/sumif/sumif-text-criteria)
- [**2****SUMIF with a number condition**→](https://practiceexcelonline.com/practice/sumif/sumif-greater-than)
- [**3****SUMIF with a separate sum\_range**→](https://practiceexcelonline.com/practice/sumif/sumif-with-sum-range)
- [**4****SUMIF with the criterion in a cell**→](https://practiceexcelonline.com/practice/sumif/sumif-criteria-from-a-cell)
- [**5****SUMIF with a wildcard**→](https://practiceexcelonline.com/practice/sumif/sumif-wildcard-contains)

## **Read the guide**

- [**Excel for job interviews: what gets tested and how to prepare**](https://practiceexcelonline.com/learn/excel-for-job-interviews)
- [**Free Excel course online: learn Excel from your first formula to job-ready**](https://practiceexcelonline.com/learn/how-to-learn-excel)
- [**Pivot tables explained, and the formulas that do the same job**](https://practiceexcelonline.com/learn/pivot-tables)
- [**Excel for finance and accounting: the skills you actually use**](https://practiceexcelonline.com/learn/excel-for-finance)
- [**How to make a graph in Excel: column, line and pie charts step by step**](https://practiceexcelonline.com/learn/excel-charts)

## **Questions**

<details>

<summary>

### How do I use SUMIF with a cell as the condition?

</summary>

Point the criteria at the cell, like =SUMIF(A2:A6,E1,C2:C6). For a comparison, join the operator with &amp;: "&gt;"&amp;E1.

</details>

## **Related functions**

- [**SUMIFS**](https://practiceexcelonline.com/functions/sumifs)
- [**COUNTIF**](https://practiceexcelonline.com/functions/countif)
- [**AVERAGEIF**](https://practiceexcelonline.com/functions/averageif)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://practiceexcelonline.com/#identity","@type":"Organization","name":"PracticeExcel","url":"https://practiceexcelonline.com/","logo":{"@id":"https://practiceexcelonline.com/#logo"}},{"@id":"https://practiceexcelonline.com/#website","@type":"WebSite","inLanguage":"en-US","name":"PracticeExcel","url":"https://practiceexcelonline.com/","alternateName":["Practice Excel Online","PracticeExcelOnline.com"],"publisher":{"@id":"https://practiceexcelonline.com/#identity"},"workTranslation":{"@id":"https://excelopgaver.dk/#website"}},{"@id":"https://practiceexcelonline.com/functions/sumif#webpage","description":"How to use SUMIF in Excel and Google Sheets: add only the rows that meet a condition. Syntax, examples and a live drill.","name":"SUMIF function in Excel: syntax and examples","url":"https://practiceexcelonline.com/functions/sumif","@type":["WebPage","FAQPage"],"breadcrumb":{"@id":"https://practiceexcelonline.com/functions/sumif#breadcrumb"},"isPartOf":{"@id":"https://practiceexcelonline.com/#website"},"mainEntity":[{"@id":"https://practiceexcelonline.com/functions/sumif#/schema/question/1"}],"potentialAction":[{"@type":"ReadAction","target":["https://practiceexcelonline.com/functions/sumif"]}],"primaryImageOfPage":{"@id":"https://practiceexcelonline.com/#logo"}},{"@id":"https://practiceexcelonline.com/functions/sumif#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://practiceexcelonline.com","position":1},{"@type":"ListItem","name":"Excel functions","item":"https://practiceexcelonline.com/functions","position":2},{"@type":"ListItem","name":"SUMIF function in Excel: syntax and examples","position":3}]},{"@id":"https://practiceexcelonline.com/functions/sumif#article","description":"How to use SUMIF in Excel and Google Sheets: add only the rows that meet a condition. Syntax, examples and a live drill.","headline":"SUMIF function in Excel: syntax and examples","inLanguage":"en-US","thumbnailUrl":"https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~U1VNSUYgZnVuY3Rpb24gaW4gRXhjZWw6IHN5bnRheCBhbmQgZXhhbXBsZXM%2Cdescription_~SG93IHRvIHVzZSBTVU1JRiBpbiBFeGNlbCBhbmQgR29vZ2xlIFNoZWV0czogYWRkIG9ubHkgdGhlIHJvd3MgdGhhdCBtZWV0IGEgY29uZGl0aW9uLiBTeW50YXgsIGV4YW1wbGVzIGFuZCBhIGxpdmUgZHJpbGwu%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_~U1VNSUYocmFuZ2UsIGNyaXRlcmlhLCBbc3VtX3JhbmdlXSk%2Cp_Ii9mdW5jdGlvbnMvc3VtaWYi%2Cs_O0S-yUpMULYKTHFJ.png","@type":["Article","TechArticle"],"author":{"@id":"https://practiceexcelonline.com/#identity"},"image":{"@id":"https://practiceexcelonline.com/#/schema/image/1"},"isPartOf":{"@id":"https://practiceexcelonline.com/functions/sumif#webpage"},"mainEntityOfPage":{"@id":"https://practiceexcelonline.com/functions/sumif#webpage"},"publisher":{"@id":"https://practiceexcelonline.com/#identity"}},{"@id":"https://practiceexcelonline.com/functions/sumif#/schema/question/1","@type":"Question","inLanguage":"en-US","name":"How do I use SUMIF with a cell as the condition?","acceptedAnswer":{"@type":"Answer","text":"Point the criteria at the cell, like =SUMIF(A2:A6,E1,C2:C6). For a comparison, join the operator with &: \">\"&E1."}},{"@id":"https://practiceexcelonline.com/#logo","@type":"ImageObject","caption":"PracticeExcel","contentUrl":"https://practiceexcelonline.com/brand/practiceexcel/icon-512.png","inLanguage":"en-US","url":"https://practiceexcelonline.com/brand/practiceexcel/icon-512.png"},{"@id":"https://practiceexcelonline.com/#/schema/image/1","@type":"ImageObject","contentUrl":"https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~U1VNSUYgZnVuY3Rpb24gaW4gRXhjZWw6IHN5bnRheCBhbmQgZXhhbXBsZXM%2Cdescription_~SG93IHRvIHVzZSBTVU1JRiBpbiBFeGNlbCBhbmQgR29vZ2xlIFNoZWV0czogYWRkIG9ubHkgdGhlIHJvd3MgdGhhdCBtZWV0IGEgY29uZGl0aW9uLiBTeW50YXgsIGV4YW1wbGVzIGFuZCBhIGxpdmUgZHJpbGwu%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_~U1VNSUYocmFuZ2UsIGNyaXRlcmlhLCBbc3VtX3JhbmdlXSk%2Cp_Ii9mdW5jdGlvbnMvc3VtaWYi%2Cs_O0S-yUpMULYKTHFJ.png","inLanguage":"en-US","url":"https://practiceexcelonline.com/_og/d/c_Page%2Ctitle_~U1VNSUYgZnVuY3Rpb24gaW4gRXhjZWw6IHN5bnRheCBhbmQgZXhhbXBsZXM%2Cdescription_~SG93IHRvIHVzZSBTVU1JRiBpbiBFeGNlbCBhbmQgR29vZ2xlIFNoZWV0czogYWRkIG9ubHkgdGhlIHJvd3MgdGhhdCBtZWV0IGEgY29uZGl0aW9uLiBTeW50YXgsIGV4YW1wbGVzIGFuZCBhIGxpdmUgZHJpbGwu%2Ceyebrow_Excel%2Bfunctions%2Csite_practiceexcel%2Ccode_~U1VNSUYocmFuZ2UsIGNyaXRlcmlhLCBbc3VtX3JhbmdlXSk%2Cp_Ii9mdW5jdGlvbnMvc3VtaWYi%2Cs_O0S-yUpMULYKTHFJ.png"}]}
```

## Sitemap

See the full [sitemap](https://practiceexcelonline.com/sitemap.md) for all pages.
