Skip to content
SheetFluent

Conditional formulas: sum and count with conditions

SUM, AVERAGE and COUNT use every row. Their conditional versions use only the rows that match. =SUMIF(B2:B9,"East",C2:C9) reads as "look down B2 to B9 for East, and add up the matching amounts in C2 to C9".

SUMIF and AVERAGEIF take one condition. SUMIFS and COUNTIFS take several, and use a row only when it meets all of them. The last lesson mixes all four on one sheet, the way a work report or a job test would.

Start practicing

Lessons in this topic

  1. 1
    Add up matching rows with SUMIF

    Use SUMIF to total only the rows that match a condition, like all Food expenses, in Excel and Google Sheets.

    PlusAbout 5 minutes
  2. 2
    Add up with two conditions using SUMIFS

    Use SUMIFS to total rows that match two or more conditions at once, like Dallas sales in January.

    PlusAbout 5 minutes
  3. 3
    Average matching rows with AVERAGEIF

    Use AVERAGEIF and AVERAGEIFS to find the average of only the rows that match, like one section's marks.

    PlusAbout 6 minutes
  4. 4
    Count with two conditions using COUNTIFS

    Use COUNTIFS to count rows that match two or more conditions, like Venmo orders from one area.

    PlusAbout 6 minutes
  5. 5
    Practice: conditional totals

    Choose between SUMIF, SUMIFS, COUNTIF and AVERAGEIF on an invoice register, the way you would at work.

    PlusAbout 6 minutes

Next topic: Lookups