# Sum formulas in Excel and Google Sheets

> Totals with conditions, running totals, totals across columns and ranges that grow. 6 answers, each checked by running it.

Source: https://spreadsheetpractice.com/formulas/topic/sum · Updated October 29, 2026 · Formulas and results on this page were run by the Spreadsheet Practice formula engine on October 29, 2026

## Answers

- [How to sum values based on criteria in Excel (SUMIF)](https://spreadsheetpractice.com/formulas/sumif-sum-based-on-criteria): Use =SUMIF(criteria_range, criteria, sum_range): it adds the numbers in sum_range on the rows where criteria_range matches. `=SUMIF(B2:B11,G1,D2:D11)`
- [How to sum with multiple criteria in Excel (SUMIFS)](https://spreadsheetpractice.com/formulas/sum-with-multiple-criteria): Use SUMIFS with the sum range first, then one range-and-condition pair per criterion: =SUMIFS(sum_range, range1, crit1, range2, crit2). `=SUMIFS(D2:D11,B2:B11,G1,C2:C11,G2)`
- [How to calculate a running total in Excel](https://spreadsheetpractice.com/formulas/running-total): Sum from a locked first cell to the current row, =SUM($B$2:B2), and fill it down. The range grows by one row each time. `=SUM($B$2:B2)`
- [How to sum values between two dates in Excel](https://spreadsheetpractice.com/formulas/sum-between-two-dates): Use SUMIFS with two date conditions on the same column: =SUMIFS(sum_range, dates, ">="&start, dates, "<="&end). `=SUMIFS(D2:D11,A2:A11,">="&G1,A2:A11,"<="&G2)`
- [How to sum if a cell contains specific text in Excel](https://spreadsheetpractice.com/formulas/sum-if-cell-contains-text): Use SUMIF with wildcards around the text: =SUMIF(range,"*"&text&"*",sum_range). `=SUMIF(A2:A9,"*"&E1&"*",B2:B9)`
- [How to sum the top 3 values in Excel](https://spreadsheetpractice.com/formulas/sum-top-3-values): Use LARGE with an array of ranks inside SUM: =SUM(LARGE(range,{1,2,3})). `=SUM(LARGE(B2:B8,{1,2,3}))`

More topics: [Counting formulas](https://spreadsheetpractice.com/formulas/topic/count) · [Lookup formulas](https://spreadsheetpractice.com/formulas/topic/lookup) · [IF and logic formulas](https://spreadsheetpractice.com/formulas/topic/logic) · [Text formulas](https://spreadsheetpractice.com/formulas/topic/text) · [Date formulas](https://spreadsheetpractice.com/formulas/topic/date) · [Dynamic array formulas](https://spreadsheetpractice.com/formulas/topic/dynamic) · [Duplicates and data cleanup formulas](https://spreadsheetpractice.com/formulas/topic/cleanup) · [Rounding and math formulas](https://spreadsheetpractice.com/formulas/topic/math) · [Percentage formulas](https://spreadsheetpractice.com/formulas/topic/percent)

Every answer: [Formula answers](https://spreadsheetpractice.com/formulas). Formulas used: `SUMIF`, `SUMIFS`, `SUM`, `LARGE`

---

Spreadsheet Practice (https://spreadsheetpractice.com) teaches spreadsheet formulas by practice: every exercise is graded in a live grid and re-checked on changed data.
